1 Reply Latest reply on Apr 25, 2016 11:35 AM by michpetrov

    a4j:commandButton is not working after rendering

    vpenugo

      Hi,

       

      I have two sections in my page and each section have one a4j:commandButton to submit that section data. Section-1 displayed first when page loads. button in Section-1 is working fine. Section-2 will display only when you select a radio button on top. Once I render Section-2, Command button (cmdButton in below code) in Section-2 is not working. even it is not invoking any action. below is my code. I have tried by adding two separate forms for each section, but this is also not worked for me.

       

      Based on the radio button selection we are rendering the sections. I am using Richfaces 4.5.11

       

      <h:form id="signinMainGridForm">
                                          <h:panelGrid id="signinMainGrid" columns="1" columnClasses="justifyLeft " width="100%">
                                                      <h:selectOneRadio id="signinSel123" immediate="true"
                                                            layout="pageDirection"
                                                            binding="#{backingBean.typeSelection}"
                                                            value="#{backingBean.defaultSelection}">
                                                            <f:selectItems value="#{backingBean.seactionTypes}"/>     
                                                            <a4j:ajax event="valueChange" status="waitStatus" execute="@this"
                                                                  render="signinInfoPG, signinPG1, signinPG2"
                                                                  listener="#{backingBean.toggleSelection}"/>          
                                                      </h:selectOneRadio>
                                                      <h:graphicImage value="/images/spacer.gif" id="spacer22" height="10" />
                                                     
                                                      <h:panelGrid id="signinPG1" columns="1" columnClasses="justifyLeft" width="100%">                              
                                                            <!-- Section-1 Begin -->
                                                            <h:panelGrid id="signinPWDPG" columns="2" columnClasses="justifyLeft"
                                                                  rendered="#{backingBean.showPwdContent}">
                                                                       
                                                              <h:graphicImage value="/images/spacer.gif" id="signinbuttonspacer051" height="10" />
                                                              <h:panelGrid id="pwdBtnPG" columns="1">
                                                                  <h:graphicImage value="/images/spacer.gif" id="signinbuttonspacer001" height="10" />
                                                                        <!-- Section to Display Command Button -->
                                                                        <h:panelGrid>
                                                                              <a4j:commandButton id="sendPwdBtn" value="Send Password"
                                                                                    styleClass="ux-btn-decision-action ux-width-10t"
                                                                                    action="#{backingBean.resetPwdInformation}" status="waitStatus" />
                                                                        </h:panelGrid>                                                     
                                                              </h:panelGrid>
                                                             
                                                            </h:panelGrid>
                                                        <!-- Section-1 End -->
                                                        <!-- Section-2 Begin -->
                                                            <h:panelGrid id="signinPG2" columns="2" columnClasses="justifyLeft" width="100%"
                                                                  rendered="#{!backingBean.showPwdContent}">
                                                                       
                                                              <h:graphicImage value="/images/spacer.gif" id="signinbuttonspacer00" height="10" />
                                                                  <h:panelGrid id="unBtnPG" columns="1">
                                                                  <h:graphicImage value="/images/spacer.gif" id="signinbuttonspacer00133" height="10" />
                                                                        <h:panelGrid>
                                                                            <a4j:commandButton id="cmdButton" value="Send User Details"
                                                                                    styleClass="ux-width-8t ux-btn-decision-action" status="waitStatus"
                                                                                    action="#{backingBean.resetUserInformation}"/>
                                                                        </h:panelGrid>
                                                                  </h:panelGrid>
                                                            </h:panelGrid>
                                                            <!-- Section-2 End -->
                                                      </h:panelGrid>
                                          </h:panelGrid>
                                          </h:form>
      

       

       

      Please help me to resolve this issue. This is my high priority.