ConfirmDialog on TabClose event

UI Components for JSF
Post Reply
Posts: 3
Joined: 07 Feb 2015, 12:16

04 Mar 2015, 13:08

How can I process the operation of closing a tab depending of a user's confirmDialog action ? "yes" to continue closing the tab, "No" to abort the operation. I have made this code below but the tab is closed anyway. Any suggestions please ?

I am using Primefaces 5.1

Code: Select all

<p:confirmDialog    closable="true" appendToBody="true" id="confirmDialog" message="Are you sure to close ?" header="Test"  widgetVar="confirmation">  
        <p:commandButton id="confirm" value="Yes" onclick="????;" oncomplete=" PF('confirmation').hide();"/>  
        <p:commandButton id="decline" value="No" onclick="PF('confirmation').hide()" /> 

<p:tabView  onTabClose="PF('confirmation').show();">
        <p:tab title="test tab" closable="true" >
           // Some inputs controls here
I am using Primefaces 5.1

Posts: 3
Joined: 07 Feb 2015, 12:16

05 Mar 2015, 14:45

Any help please ?
Thank you guys.

Expert Member
Posts: 9408
Joined: 17 Jun 2010, 13:34
Location: Netherlands

05 Mar 2015, 16:22

Ronald van Kuijk
PrimeFaces 6.1, PrimeFaces plus 0.0.2 | JbossWildfly 10.1| Mojarra 2.2.13
Fedora 61, Firefox 'most recent'
Read the forum posting rules

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests