2 Replies Latest reply on Apr 19, 2013 12:24 AM by maran selva

    SwitchType=server not calling the bean class in the rich:tabpanel

    maran selva Newbie

      Hi,

             I am using rich:tabpanel for swicth over the tabs,right now i included one tab inside rich:tabpanel

       

      if i use switchType="client"  the included page contains <h:form> so i am able to save the record.

      but if i use switchType="Server" as my parent xhtml contains a form and also include page contains another form.

      so it is not caling the bean class.

       

      if i try to remove the include page <h:form> even after it is not submitting the record what might be the problem .

      i want to use Switchtype="server" to refresh the page for each transaction.

       

      lats.xhtml----parent

       

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

            xmlns:ui="http://java.sun.com/jsf/facelets"

            xmlns:h="http://java.sun.com/jsf/html"

            xmlns:f="http://java.sun.com/jsf/core"

            xmlns:a4j="http://richfaces.org/a4j"

            xmlns:rich="http://richfaces.org/rich">

            <f:view>

              <h:head>

              </h:head>

              <h:body>

                

                <h:form id="ltForm">

              <rich:panel>

                  <rich:tabPanel switchType="server"  id="LTASTab" activeItem="#{tabBean.selectedTab}">

            

              <rich:tab header="RTP" name="RTP">

             

               <ui:include src="/projects/rtp.xhtml" />

                

              </rich:tab>

            

          </rich:tabPanel>

          </rich:panel>

           </h:form>

                </h:body>

                </f:view>

      </ui:composition>

       

      --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      rtp.xhtml

       

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"

                xmlns:f="http://java.sun.com/jsf/core"

                xmlns:ui="http://java.sun.com/jsf/facelets"

                xmlns:h="http://java.sun.com/jsf/html"

                xmlns:a4j="http://richfaces.org/a4j"

                xmlns:rich="http://richfaces.org/rich">

                <f:view>

                          <h:head>

                          <link rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/resources/css/style.css" type="text/css"/>

                          </h:head>

                          <h:body>

                  <fieldset>

                            <legend>RTP</legend>

                                    <h:form id="myform">

                                              <h:panelGrid columns="3" >

                                                        <h:outputText value=" Value : "  styleClass="font"/>

                                                                  <h:inputText id="goalvalue" value="#{rtpGoal.rtp_goal_value}"

                                                                            required="true" requiredMessage="Please enter the value">

                                                                            <f:validateLength for="value" minimum="1" maximum="50" />

                                                                  </h:inputText>

                                                                  <rich:message for="value" />

                                                                  <f:facet name="footer">

                                                                            <h:panelGroup style="display:block; text-align:center">

                                                                                      <a4j:commandButton value="Save" action="#{rtpAction.save()}">

       

       

                                                                                      </a4j:commandButton>

                                                                                      <h:commandButton id="rtpReset" value="Reset" type="reset" />

                                                                            </h:panelGroup>

                                                                  </f:facet>

                                                                  </h:panelGrid>

       

                                    </h:form>

                                    </fieldset>

       

                          </h:body>

                </f:view>

      </ui:composition>