You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Hasnain Badami <ha...@gmail.com> on 2006/11/14 13:55:52 UTC
Panel Tabbed Pane
Hi
I have written the following code:
<t:panelTabbedPane
styleClass="levelOneTabbedPane"
width="100%"
bgcolor="#FFFFCC"
activeTabStyleClass="levelOneActiveTab"
inactiveTabStyleClass="levelOneInactiveTab"
activeSubStyleClass="levelOneActiveSub"
inactiveSubStyleClass="levelOneInactiveSub"
tabContentStyleClass="levelOneTabContent"
serverSideTabSwitch="true"
id="pDetailTab"
>
<t:panelTab label="#{messages['snapshot_view']}" >
<f:subview id="tabportfoliodetailsnapshotview" rendered="#{
tabIndices.portfolioTabIndex==0}">
<jsp:include page="portfoliodetailsnapshotview.jsp" />
</f:subview>
</t:panelTab>
<t:panelTab label="#{messages['time_series_view']}" >
<f:subview id="tabportfoliodetailtimeseriesview" rendered="#{
tabIndices.portfolioTabIndex==1}">
<jsp:include page="portfoliodetailtimeseriesview.jsp" />
</f:subview>
</t:panelTab>
<t:tabChangeListener type="
com.prytania.model.backingbeans.PortfolioDetailTabManager" />
</t:panelTabbedPane>
There are two separate backing beans each for the
portfoliodetailsnapshotview.jsp and portfoliodetailtimeseriesview.jsp. At a
single point in time, the tabIndices.portfolioTabIndex can either be 0 or 1
which means either portfoliodetailsnapshotview.jsp and
portfoliodetailtimeseriesview.jsp should be included. But in the logs, I can
see the code of both the backing beans being executed (constructors being
called),. Why is that so? If the rendered attribute equals to false why
would the framework still include the jsp. Is there any solution to the
above mentioned problem. I mean if rendered is false then the included jsp
should not be processed.
Thanks in advance
Best Regards
Hassnain