-
1. Re: Performance Problem using rich:tabPanel.
nbelaevski Aug 14, 2009 6:29 AM (in response to asingla4)Hi Akash,
Please post tab panel code with all defined attributes. -
2. Re: Performance Problem using rich:tabPanel.
asingla4 Aug 14, 2009 12:23 PM (in response to asingla4)Hi Nick,
I did a bit of code digging and found the following:
All the List objects belonging to extendeddatatables in a tabpanel are called.
All my 10 pages were using rich:extendedDataTable and thus, the getter method corresponding to the object is called. If the page has not been initialized, then the constructor is also called for the page.
Apart from this, the bean referring to the selected tab of the tabPanel will be called everytime.
This means, the table List is being created even if the user has not clicked on the page tab.
Akash -
3. Re: Performance Problem using rich:tabPanel.
asingla4 Aug 14, 2009 12:25 PM (in response to asingla4)Forgot to add,
Only the getter method of the List object and the default constructor is called on the page and nothing else. No other method is called till the tab has not been clicked. -
4. Re: Performance Problem using rich:tabPanel.
ryanyoder Aug 14, 2009 12:45 PM (in response to asingla4)We had the same problem.
The workaround is easy and elegant.
Do your tab content as an include and only include it if its the currently selected tab.
Here is an example.
<rich:tabPanel switchType="ajax" selectedTab="#{companyWorksheet.currentTabName}">
<rich:tab label="#{msg['label.collections']}" name="collections">
<c:if test="${companyWorksheet.currentTabName eq 'collections' or empty companyWorksheet.currentTabName}">
<ui:include src="/WEB-INF/includes/companyWorksheet/collectionsContainer.xhtml"/>
</c:if>
</rich:tab>
<rich:tab label="#{msg['label.payments']}" name="payments">
<c:if test="${companyWorksheet.currentTabName eq 'payments'}">
<ui:include src="/WEB-INF/includes/companyWorksheet/paymentsContainer.xhtml"/>
</c:if>
</rich:tab> -
5. Re: Performance Problem using rich:tabPanel.
asingla4 Aug 14, 2009 1:51 PM (in response to asingla4)Hi Ryan,
thanks a lot for looking into,
I have used the following code,<rich:tabPanel switchType="ajax" selectedTab="#{OverviewBean.selectedTab}"> <rich:tab label="Tab1" id="tab1" name="tab1"> <c:if test="#{OverviewBean.selectedTab eq 'tab1'}"> <ui:include src="../pages/tab1.xhtml" /> </c:if> </rich:tab> <rich:tab label="Tab2" id="tab2" name="tab2"> <c:if test="${OverviewBean.selectedTab eq 'tab2'}"> <ui:include src="../pages/tab2.xhtml" /> </c:if> </rich:tab> <rich:tab label="Tab3" id="tab3"> <ui:include src="../pages/tab3.xhtml" /> </rich:tab> </rich:tabPanel>
The problem is still not solved
:((
Nick,
I have attached a working project testProject2 in RF-7695 JIRA tag for your reference.
Thanks -
6. Re: Performance Problem using rich:tabPanel........ (solved)
asingla4 Aug 14, 2009 2:01 PM (in response to asingla4)Hi Ryan,
I really appreciate your efforts.
My uri was incorrect, hence, the code didnt work.
I had to use http://java.sun.com/jstl/core instead of http://java.sun.com/jsp/jstl/core.
Its solved now. Thanks everyone for your time and efforts.
I appreciate.
Regards
Akash -
7. Re: Performance Problem using rich:tabPanel.
nbelaevski Aug 14, 2009 6:08 PM (in response to asingla4)http://java.sun.com/jstl/core is for Fcaelets and http://java.sun.com/jsp/jstl/core - for JSP. Please take a look: https://jira.jboss.org/jira/browse/RF-3341