As you can see from the image below, 'yes' button gets the primary focus. Can you ensure that 'No' is in focus without swapping the buttons around, perhaps with an attribute?
As far as I know, the only way is to swap the buttons in the xhtml. But you can keep the order of appearance in the dialog with float:left
on the Yes button.
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
<p:commandButton value="Yes" type="button" style="float:left;" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
</p:confirmDialog>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With