Primefaces Datagrid:未使用选定值更新对话框
primefaces datagrid有问题。我正在尝试使用单击p:commandLink时选择的值更新对话框。 对话框最初不显示任何值,但当我刷新页面并单击commandLink时,它会使用以前选择的值进行更新。 我正在JBoss4.3.0上使用primefaces-2.2.1。如有任何帮助,将不胜感激Primefaces Datagrid:未使用选定值更新对话框,primefaces,Primefaces,primefaces datagrid有问题。我正在尝试使用单击p:commandLink时选择的值更新对话框。 对话框最初不显示任何值,但当我刷新页面并单击commandLink时,它会使用以前选择的值进行更新。 我正在JBoss4.3.0上使用primefaces-2.2.1。如有任何帮助,将不胜感激 <p:column> <p:panel header="#{loc.loc_details}" style="text-align:center">
<p:column>
<p:panel header="#{loc.loc_details}" style="text-align:center">
<h:panelGrid columns="1" style="width:100%">
<p:graphicImage value="/user/xyz/resources/images/#{loc.loc_details}.jpg"/>
<h:outputText value="#{loc.locality}" />
<h:outputText value="#{loc.city}" />
<h:outputText value="#{loc.state}" />
<p:commandLink update="locDetail,locDetailGrid" oncomplete="locDialog.show()" title="View Detail" border="0" >
<p:graphicImage value="/user/xyz/resources/images/imagesCA6ETPOM.jpg" />
<f:setPropertyActionListener value="#{loc}"
target="#{tutorialsBean.selectedLocality}" />
</p:commandLink>
</h:panelGrid>
</p:panel>
</p:column>
在命令链接中,在对话框中添加更新和处理属性以刷新信息 像这样: 将ID放入对话框:
<p:dialog header="Loc Detail" id="locDialog" widgetVar="locDialog" modal="true">
将“更新到”对话框:
<p:commandLink update="locDetail,locDetailGrid" oncomplete="locDialog.show()" title="View Detail" border="0" update="locDialog" process="@this" ajax="true" partialSubmit="true" >
<p:graphicImage value="/user/xyz/resources/images/imagesCA6ETPOM.jpg" />
<f:setPropertyActionListener value="#{loc}" target="#{tutorialsBean.selectedLocality}" />
</p:commandLink>
<p:commandLink update="locDetail,locDetailGrid" oncomplete="locDialog.show()" title="View Detail" border="0" update="locDialog" process="@this" ajax="true" partialSubmit="true" >
<p:graphicImage value="/user/xyz/resources/images/imagesCA6ETPOM.jpg" />
<f:setPropertyActionListener value="#{loc}" target="#{tutorialsBean.selectedLocality}" />
</p:commandLink>