Is there any way (or the right way) to conditionally display a dialog on grids based on a bean condition. The code is as follows:
<p:dialog id="dialogTest" widgetVar="dialogTest" header="#{text['modal.header']}" modal="true" > <h:outputText value="Test output" /> </p:dialog> <p:menuitem value="Check" actionListener="#{backingBean.performCheck}" oncomplete="PF('dialogTest').show()" icon="ui-icon-arrowthick-1-e"/>
My bean support is as follows:
private boolean conditionFlag;
I just want to show a dialog if conditionFlag is true . How can I do something like this on p:menuitem after performCheck works?
oncomplete="if (#{backingBean.conditionFlag}) { PF('dialogTest').show() }"
source share