I have a a button that is setting a property to a backing bean to be used in Primefaces Dialog.
p:commandButton value="Options" onclick="optionsDialog.show();">
`<f:setPropertyActionListener value="#{item}" target="#{bean.tempItem}" />
</p:commandButton>
I can see that setter is called here.
<p:dialog header="Options" widgetVar="OptionsDialog" dynamic="true" modal="true"
width="400" height="250">
<h:outputText value="#{bean.tempItem.value}"/>
</p:dialog>
Here the getter is never called.
That’s because the dialog’s content is not been updated before you show it. You need to update it by
updateattribute of the command button. Reference the (relative) client ID of the dialog in there. You also need to replaceonclickbyoncompletebecause theonclickfires before the action is performed andoncompletefires after the action is performed.You’ve by the way also a lowercase/uppercase typo in the dialog widget name. But that would cause the dialog to not show up at all, which is a different problem.