Primefaces p:confirmDialog action listener does not fire if the process does not point to form id

302 views Asked by At
    <p:selectOneMenu id="country" value="#{empCon.selectedCountry}" required="true" onchange="PF('confirm').show()">
        <f:selectItem itemLabel="-SELECT-" itemValue="NULL" noSelectionOption="true"></f:selectItem>
        <f:selectItems value="#{empCon.country}" 
                                var="a"
                                itemLabel="#{a}"
                                itemValue="#{a}"></f:selectItems>
    </p:selectOneMenu> <p:confirmDialog widgetVar="confirm" appendToBody="false" message="Are you sure you want to change your selection?" header="Confim" severity="alert">
<h:form>
<p:commandButton value="Yes" process=":te:country" update=":te:province :te:messages" 
actionListener="#{empCon.onSelectCountry}"
oncomplete="PF('confirm').hide()" />
<p:commandButton value="No" type="button"  onclick="PF('confirm').hide()" />
    </h:form>   

With this code "onSelectCountry" actionListener is not fired. But if i update process attribute's value to only the form id( ":te") it works. Please answer; i just want to know the root cause.

0

There are 0 answers