我正在使用 primefaces 对话框模型在单击按钮时显示更多详细信息。但我无法获取对话框上的值。
<p:dataGrid id ="boardpanel" var="item" value="#{bLDashBoardAction.listBondLoc}" columns="#{message.no_of_columns}"
rows="20" paginator="true">
<p:column>
<p:panel header="Details" style="text-align:center">
<h:panelGrid columns="1" style="width:100%;">
<h:outputText value="#{item.rackTagCode}" title="#{item.rackTagCode}" />
<p:commandLink update=":frmDashBoard:blDetail" oncomplete="blDialog.show()" title="View Detail">
<p:graphicImage value="/images/search.png"/>
***<f:setPropertyActionListener value="#{item}"
target="#{bLDashBoardAction.rackTagCode}" />***
</p:commandLink>
</h:panelGrid>
</p:panel>
</p:column>
</p:dataGrid>
<p:dialog header="BL Detail" widgetVar="blDialog" modal="true">
<p:outputPanel id="blDetail" style="text-align:center;" layout="block">
<h:panelGrid columns="2" cellpadding="2">
<h:outputLabel for="blNo" value="BL " />
***<h:outputText id="blNo" value="#{item.rackTagCode}" />***
</h:panelGrid>
我从 BLDashBoardAction 类的 getListBondLoc 函数中获取 rackTagCode 列表。这是我的 getListBondLoc 函数:
private String bondLocationId;
private String serviceAreaId;
private String facilityId;
private String bondLocationCode;
private String awb;
private String zoneId;
private String sectorId;
private String rackTagCode;
private String blTagCode;
private String ipAddress;
private String ptlStatusId;
private String errorCode;
private String processIndicator;
private String textMsg;
private String rackTagCodeSel;
private BondLocationEBean beanSel;
private List<BondLocationEBean> listBondLoc;
public String navigateList(){
listBondLoc = bondLocBusServ.searchBondLocList();
return "/jsp/dashboard/dashboard";
}
public void doSearch()
{
listBondLoc = bondLocBusServ.searchBondLocList(sectorId, zoneId, facilityId,ptlStatusId);
}
其余代码是上述属性的 getter 和 setter,其中 BondLocationEBean 映射到 db 中的所有列。
提前致谢。