ConfirmationDialog Primefaces <p>..Now I come across a question.</p> <pre><code>&lt;tabview&gt; &lt;tab&gt;... &lt;/tab&gt; &lt;tab&gt;... &lt;/tab&gt; &lt;tab&gt;... &lt;/tab&gt; &lt;tab id="p"&gt; &lt;h:form id="qorm"&gt; &lt;h:panelGroup &gt; &lt;p:commandButton value="Save" actionListener="#{...}" update="priorityDataTable" /&gt; &lt;p:commandButton id="cancelButton" value="Cancel" onclick="confirmation.show()" type="button" /&gt; &lt;/h:panelGroup&gt; &lt;p:dataTable id="priorityDataTable" styleClass="priorityDataTable" selection="#{...selectedJobQueue}" rowSelectListener="#{...onRowSelect}" selectionMode="single" value="#{....priorityList}" var="priority" &gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; Request&lt;br /&gt;Number &lt;/f:facet&gt; &lt;h:outputText value="#{priority.reworkRequest.requestNumber}" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; # &lt;/f:facet&gt; &lt;h:outputText value="#" /&gt; &lt;/p:column&gt; &lt;p:column&gt; &lt;f:facet name="header"&gt; Status &lt;/f:facet&gt; &lt;h:outputText value="#{priority.priorityStatus.getTextValue()}" /&gt; &lt;/p:column&gt; &lt;/p:dataTable&gt; &lt;h:panelGroup class="queuePriorityActionButton"&gt; &lt;p:commandButton id="moveUpButton" value="Move Up" actionListener="#{....moveUp()}" /&gt; &lt;p:commandButton id="moveDownButton" value="Move Down" actionListener="#{....moveDown()}" /&gt; &lt;/h:panelGroup&gt; &lt;/h:form&gt; &lt;h:form&gt; &lt;p:confirmDialog message="All updates since your last save will be lost. Are you sure you want to exit?" modal="true" header="Initiating destroy process" severity="alert" widgetVar="confirmation"&gt; &lt;p:commandButton value="Yes Sure" update="queuePriorityForm:priorityDataTable " oncomplete="confirmation.hide()" actionListener="{....resetBack()}" /&gt; &lt;p:commandButton value="Not Yet" onclick="confirmation.hide()" type="button" /&gt; &lt;/p:confirmDialog&gt; &lt;/h:form&gt; &lt;/tab&gt; &lt;/tabview&gt; </code></pre> <p>when user change the priority of the table, and the user moves a request(s) and then selects another tab without saving the request.Must display a confirmationDialog. So I don't know how to do it.AnyOne can help me</p>