0 Replies Latest reply on Dec 19, 2011 12:02 PM by S G

    Why <rich:tab> tab click is slow

    S G Newbie

      Hi All,

       

      I am new to this technology. We are migrating from JSF1.2/RF3 to JSF2/RF4. I am having following problem on using Tab Panel,

       

      1. Some times first click is not working, It is working in second click

      2. Performance is slow when tab is clicked taking 1 sec. Can I make it work using switchtype=client with action submition (How?)

       

      Can you please help me on this.

       

      <a4j:jsFunction name="enter" action="#{manageRegTransBean.resetQuickTitleFlag}" render="tranTabs" />

       

                      <rich:tabPanel id="tranTabs" switchType="ajax"  activeItem="#{manageRegTransBean.selTabName}" itemChangeListener="#{manageRegTransBean.processItemChange}"     >

       

                          <rich:tab id="qTTab" header="Quick Title"

                              styleClass="nowrap"

                              rendered="#{stRegTransBean.featureID == '1' || stRegTransBean.featureID == '19' || stRegTransBean.featureID == '2'}"

                              disabled="#{stRegTransBean.quickEntryVisited}">

                              <ui:include src="/pages/erttrans/qTab.xhtml" />

                          </rich:tab>

                          <rich:tab id="oTab" header="Owners" immediate='true' onenter="enter()">

                              <ui:include src="/pages/erttrans/oTab.xhtml" />

                          </rich:tab>

                          <rich:tab id="vTab" header="Vehicle" immediate='true' onenter="enter()" >

                              <ui:include src="/pages/erttrans/v.xhtml">

                                  <ui:param name="disabled" value="false" />

                              </ui:include>

                          </rich:tab>

                          <rich:tab id="lTab" header="Liens" immediate='true' onenter="enter()" >

                              <ui:include src="/pages/erttrans/lTab.xhtml">

                                  <ui:param name="disabled" value="false" />

                              </ui:include>

                          </rich:tab>

                          <rich:tab id="sTab" header="Sales" immediate='true' onenter="enter()" >

                              <ui:include src="/pages/erttrans/salesTab.xhtml">

                                  <ui:param name="disabled" value="false" />

                              </ui:include>

                          </rich:tab>

                          <rich:tab id="fTab" header="Fees" immediate='true' onenter="enter()" >

                              <ui:include src="/pages/erttrans/fTab.xhtml">

                                  <ui:param name="disabled" value="false" />

                              </ui:include>

                          </rich:tab>

                          <rich:tab id="iTab" header="Inventory" immediate='true' onenter="enter()"                       

                              rendered="#{stRegTransBean.featureID != '31' &amp;&amp; stRegTransBean.featureID != '10' &amp;&amp; stRegTransBean.featureID != '3404' &amp;&amp; stRegTransBean.featureID != '202'}">

                              <ui:include src="/pages/erttrans/iTab.xhtml">

                                  <ui:param name="disabled" value="false" />

                              </ui:include>

                          </rich:tab>

                          <rich:tab id="dTab" header="Documents" immediate='true' onenter="enter()"

                              disabled="#{(stRegTransBean.tranState != '8' &amp;&amp; stRegTransBean.tranState == '11') ||  stRegTransBean.transactionID == null}">

                              <ui:include src="/pages/erttrans/dTab.xhtml">

                                  <ui:param name="disabled" value="false" />

                              </ui:include>

                          </rich:tab>

       

                      </rich:tabPanel>

       

      BackBean:

       

      public void processItemChange(final ItemChangeEvent p_event) throws AbortProcessingException

          {

       

              setSelTabName(p_event.getNewItemName());

              if("fTab".equals(p_event.getNewItemName())){

                  XService();

              }

              resetQuickTitleFlag();

       

              FacesContext.getCurrentInstance().renderResponse();

          }