I have a jsf facelet page like this (extremely simplified version):
<h:form id="frmAnagPersonName">
<p:commandButton value="Edit" icon="ui-icon-gear"
update="@form :frmEdit"
onsuccess="_dlgEdit.show()"/>
...
<p:dataTable etc...
...
</h:form>
<p:dialog id="dlgEdit" widgetVar="_dlgEdit" dynamic="true" modal="true" closable="true"
header="Person Identity">
<h:form id="frmEdit" >
<p:panelGrid id="pnlEdit" columns="2">
<p:outputLabel id="lblName" for="eName" value="Name"/>
<p:inputText id="eName" value="#myBean.personName}"
</p:panelGrid>
</h:form>
</p:dialog>
It works fine, until I put a dynamyc Header in the dialog:
<p:dialog ... header="#{myBean.header}" ... >
at which point i have to change the update
attribute in the p:commandButton
:
update="@form :dlgEdit"
But in this case the dialog will show up only at the first click on the button. It won't show up the second time, then again show up...
Why? How can I have the dialog show up always?
Thank you