rich:popuppanel a4j:command actionListener not working on first click
thinksteep May 9, 2012 12:46 PMHi Community,
We are using JSF2 and Richfaces 4.1.2.
We have popuppanel with a4j:command button. actionListener associated with this command button is not being invoked on first click. Here is the code I am using. Any input would be really appreciated.
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich">
    <f:subview id="mSubView">
        <div class="divHeaderArea" id="divHeaderArea">
            <div class="divHeaderLogo"> 
            </div>
         </div>
        <h:form id="mainForm">
            <a4j:outputPanel id='headerLinks' layout="block">
                <ul id="sddm">
                    <li>
                    <a4j:commandLink id="accountLinkId"
                                     value="Account"
                                     actionListener="#{MyBean.loadDetails}"
                                     oncomplete="#{rich:component('uAccountMId')}.show();"
                                     render="uAccountMId">
                    </a4j:commandLink>
                    </li>
                </ul>
            </a4j:outputPanel>
        </h:form>
        <rich:popupPanel id="uAccountMId"
                         style="border:5px solid #5e81ac; background-color:#dce3ed;">
            <f:facet name="header">
                <h:outputText value="User Account"/>
            </f:facet>
                <h:panelGrid columns="3" cellpadding="0" cellspacing="0" styleClass="tblDetails">
                    <h:panelGroup>
                        <h:outputText value="FirstName"/>
                    </h:panelGroup>
                    <h:inputText id="sFirstNameId"
                                 value="#{MyBean.firstName}"
                                />
                    <h:panelGroup>
                        <h:message for="settingsModalUserDetailsFirstNameId" styleClass="error"/>
                    </h:panelGroup>
                    <!-- USER LAST NAME -->
                    <h:panelGroup>
                        <h:outputText value="LastName"/>
                    </h:panelGroup>
                    <h:inputText id="sLastNameId"
                                 value="#{MyBean.lastName}"/>
                    <h:panelGroup>
                        <h:message for="settingsUserDetailsLastNameId" styleClass="error"/>
                    </h:panelGroup>
                </h:panelGrid>
                <a4j:commandButton id="saveButton" 
                                   value="Save"
                                   actionListener="#{MyBean.save}"
                                   oncomplete="#{rich:component('uAccountMId')}.hide()"
                                   styleClass="buttonStyle"
                                   />
            </rich:popupPanel>
    </f:subview>
</ui:composition>