Global ConfirmDialog issues in PF10

UI Components for JSF
Post Reply
yahia88
Posts: 50
Joined: 19 Nov 2014, 01:04

21 Oct 2021, 12:06

Hi,

I'm using Primefaces10 and I call a global confirmDialog, but when I click on "Yes" no action is launched, when I used the same code in PF 6 for example, it worked

Code: Select all

<f:facet name="footer">
                            <p:commandButton value="Save" icon="pi pi-check" action="#{clientView.modifierClient}" update="frm1:messages0"  >
                            	<p:confirm header="Confirmation" message="Would you like to save changes?" icon="ui-icon-alert"/>
                            </p:commandButton>
                            <p:commandButton value="Cancel" icon="pi pi-times" onclick="PF('wv_modifierClient').hide()" class="ui-button-secondary" immediate="true" />
                       </f:facet>
And the confirmDialog:

Code: Select all

<p:confirmDialog  global="true" showEffect="fade" hideEffect="fade" styleClass="box-warning" responsive="true" style="position:fixed" position="center center">
		<p:commandButton value="Oui" icon="pi pi-check"  />
        <p:commandButton value="Non"  styleClass="ui-button-secondary" icon="pi pi-times" />
	</p:confirmDialog>	
Is there any changes about this?

Thanks in advance

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

21 Oct 2021, 20:29

you are missing styleClass="ui-confirmdialog-yes" on the YES button.

See the example: https://www.primefaces.org/showcase/ui/ ... alog.xhtml
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

yahia88
Posts: 50
Joined: 19 Nov 2014, 01:04

22 Oct 2021, 11:10

Hi,

Thank you very much @Melloware, it's working

Regards

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

22 Oct 2021, 13:25

Excellent!
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 49 guests