I've notice something regarding to global confirmDialog used with commandlink and commandButton.
if the the commandButton has the property ajax="false", the confirm dialog is not shown.
The commandLink works as expected and both of them with ajax="true" as well.
Code: Select all
<p:commandButton ajax="false" value="" action="#{myBean.myAction}" id="buttonNotOK">
<p:confirm icon="ui-icon-alert" header="not ok" message="won't show"/>
</p:commandButton>
<p:commandLink ajax="false" value="" action="#{myBean.myAction}" id="buttonOK">
<p:confirm icon="ui-icon-alert" header="ok" message="this works"/>
</p:commandLink>
<p:confirmDialog global="true">
<p:commandButton value="do it" styleClass="ui-confirmdialog-yes" icon="ui-icon-check"/>
<p:commandButton value="cancel" styleClass="ui-confirmdialog-no" icon="ui-icon-close"/>
</p:confirmDialog>
Thanks in advance,
Juanjo