views:

856

answers:

0

The code below has been simplified to the simplest possible thing that is failing. Basically when someone requests to confirm an action, I am forcing them to login, then allowing them to confirm the action. This is all done with ajax. The first form submission happens correctly but the second one fails to run the desired ActionListener. The second form is posting to the server though.

<h:panelGroup id="confirmPanelWrapper">
    <h:panelGroup id="loginPanelInner" rendered="#{(!login.authenticated)}">
        <a4j:form id="loginForm">
            <h:outputText value="Enter your proctor login."/><br/>
            <br/>
            <h:outputText value="User Name *"/><br/>
            <h:inputText size="30" id="username" value="#{login.username}"/><br/>
            <br/>
            <h:outputText value="Password *"/><br/>
            <h:inputSecret size="30" id="password" value="#{login.password}"/><br/>
            <br/>
            <a4j:commandButton value="Submit" action="#{login.authenticateProctor}" reRender="confirmPanelWrapper"/>
        </a4j:form>
    </h:panelGroup>
    <h:panelGroup id="confirmPanel" rendered="#{(login.authenticated)}">
        <a4j:form id="confirmForm">
            <a4j:commandButton
                       value="Yes"
                       id="confirmTest"
                       actionListener="#{beanName.confirmTestAssociation}"
                       reRender="confirmPanelWrapper"
                       style="padding-right:10px;"/>
            <a4j:commandButton
                       value="No"
                       id="denyTest"
                       reRender="confirmPanelWrapper"
                       actionListener="#{beanName.selectionNotConfirmed}"/>
        </a4j:form>
    </h:panelGroup>
  </h:panelGroup>