3 Replies Latest reply on Feb 11, 2010 7:02 AM by ilya_shaikovsky

    rich:tabpanel and a4j:commandButton

    dejela

      Hi!

       

      I have a problem with tabPanel and a4j:commandButton.

       

      I have in the second tab a4j:commandButton.

       

      After the tab was switched with AJAX (switchType="ajax")  the commandButton action is not being called. As well as with aj4:commandLink

       

      How can I fix it?

        • 1. Re: rich:tabpanel and a4j:commandButton
          ilya_shaikovsky
          show the code.
          • 2. Re: rich:tabpanel and a4j:commandButton
            dejela
            <rich:tabPanel headerAlignment="center" switchType="ajax">
            <rich:tab label="Uupload Job" labelWidth="100px" id="uploadJob">
            <%@ include file="transferFile.jsp"%>
            </rich:tab>
            <rich:tab styleClass="category" label="View Data" labelWidth="100px"
            id="viewData">
            Hello User
            </rich:tab>
            <rich:tab styleClass="community" label="Execute"
            labelWidth="100px" id="Execute" >
            <a4j:form>
            <br>
            <h:outputText  value="Note: You will be Charged while executing to engine" style="font-weight:bold"/>
            <br></br>
            <a4j:commandButton value="Execute" action="#{jobsImpl.processJob}" ></a4j:commandButton>
            </a4j:form>
            <br></br>
            <h:outputText id="res" value="#{pjobsImpl.result}"
            rendered="#{not empty pjobsImpl.result}" style="font-size:20px;" />
            </rich:tab>
            <rich:tabPanel>
            As well, what is the difference between switchType ="ajax" to switchType="client"?
            • 3. Re: rich:tabpanel and a4j:commandButton
              ilya_shaikovsky

              Do you have the form around tab panel itself? if so - one of the forms should be removed as them can't be nested.

               

              If this is not the case - which RF version you using?

               

              On you second question - if you using switchType = client - all the tabs loaded to the client and then switched there without any requests. if using ajax - only current tab loaded and when switching occurs - next tab loaded.