0

I am using "panelTabbedPane" and created 3 tabs having different processing elements. Completing the details on 1st tab, switch to 2nd and 3rd works perfectly fine. But Once I decide to switch from 3rd tab to 1st or 2nd, whole page refresh and loading of all data happens again. Its a huge hit on performance. Can anyone help me?

 <t:panelTabbedPane enabledOnUserRole="true"
                binding="#{ABCController.tabSet}" serverSideTabSwitch="true"
                styleClass="tabbedPane" activeTabStyleClass="activeTab"
                inactiveTabStyleClass="inactiveTab"
                disabledTabStyleClass="disabledTab" activeSubStyleClass="activeSub"
                tabContentStyleClass="tabContent"
                immediateTabChange="false">

                <t:panelTab id="panelTab1" disabled="#{abc.disableTabOne}"
                    label="#{abc.tab1LabelTxt}">
                    <jsp:include page="./test1.jsp"></jsp:include>
                </t:panelTab>

                <t:panelTab id="panelTab2"  disabled="#{abc.disableTabTwo}"
                    label="#{abc.tab2LabelTxt}">
                    <jsp:include page="./test2.jsp"></jsp:include>
                </t:panelTab>

                <t:panelTab id="panelTab3" disabled="#{abc.disableTabThree}"
                    label="#{abc.tab3LabelTxt}" >
                    <h:outputText rendered="#{!abc.downloadView}">
                       <jsp:include page="./test3.jsp"></jsp:include>
                    </h:outputText>
                    <h:outputText rendered="#{abcn.downloadView}">
                        <jsp:include page="./test4.jsp" />
                    </h:outputText>
                </t:panelTab>

                <t:tabChangeListener
                    type="org.portlets.controller.ABCController" />
            </t:panelTabbedPane>

1 Answers1

0

From the documentation:

immediateTabChange

Define if the process validation and update model phases should be executed before change between tabs, when serverSideTabSwitch = true (if is false, the switch is done by other way so this property does not have any effect). Note that if this property is set as false, only a tab change is done if all input fields inside the form are valid (including input components outside this panel). By default is true, so both phases are not executed.

Since you have serverSideTabSwitch=true, tab changing is done by a request/response cycle as observed by you. Yet by having set immediateTabChange=false, this happens only after you have vistited all available tabs. Try setting serverSideTabSwitch=false (yet I do not know under which circumstances the tab data will be submitted eventually, haven't tried this myself).

f_puras
  • 2,521
  • 4
  • 33
  • 38