2 Replies Latest reply on Sep 21, 2015 2:55 AM by vidyasagar penugonda

    a4j:ajax event="click" not working with h:commandButton

    vidyasagar penugonda Novice

      Hi,

       

      I have a command button and I want to change my tab when the user clicks on. if I add a4j:ajax and event 'click' it is not invoking my button action method and not opening the target tab.

      We are doing a upgrade from RF 3.3.3 to RF 4.5.6.

      code:

       

      <h:form id="spanel">

                      <h:commandButton id="outreachCmd" action="#{sampleBean.gotoTab}"

                          value="Go to Tab 2" >

                          <a4j:ajax event="click" render="poctab" />

                      </h:commandButton>

      </h:form>

       

      <h:form id="mainform">

                      <rich:tabPanel switchType="ajax" id="poctab" activeItem="#{sampleBean.tabName}" >

                          <rich:tab header="TAB 1" name="tab1">

                              <br />

                              <h:outputText value="This is Sample Tab 1 (RichFaces)" />

                          </rich:tab>

                          <rich:tab header="TAB 2" name="tab2">

                              <br />

                              <b><h:outputText value="This is Sample Tab 2 (RichFaces)" /></b>

                          </rich:tab>

                      </rich:tabPanel>               

      </h:form>

       

       

      can anyone please help me to solve this?