Jsf primefaces对话框模型未显示任何值
我正在使用primefaces对话框模型在单击按钮时显示更多详细信息。但是我无法在对话框中获取值Jsf primefaces对话框模型未显示任何值,jsf,dialog,primefaces,Jsf,Dialog,Primefaces,我正在使用primefaces对话框模型在单击按钮时显示更多详细信息。但是我无法在对话框中获取值 <p:dataGrid id ="boardpanel" var="item" value="#{bLDashBoardAction.listBondLoc}" columns="#{message.no_of_columns}" rows="20" paginator="true"> <p:column> <p:pa
<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中的所有列
提前感谢。您在对话框中调用了错误类型的变量。改变 到
终于找到了解决办法
<f:setPropertyActionListener value="#{item}"
target="#{bLDashBoardAction.blEbean}" />
我应该将一个Ebean对象作为目标,然后我就可以使用bLDashBoardAction.blEbean.rackTagCode获取变量。您好,谢谢您的回答。但是我在对话框中得到了这样的结果:persistence.bean。BondLocationEBean@1d60b6a,是否需要转换任何内容?在您的设置中,将值设置为{item.rackTagCode}这可能会解决问题在我像上面那样更改后,它没有打印任何内容您的类的名称是什么?我从中获得列表的ActionClass的名称:BLDashBoardACtion,Ebean class name-BondLocationEBean
<f:setPropertyActionListener value="#{item}"
target="#{bLDashBoardAction.blEbean}" />