about rendered

Hi all,

I have a jsp page which pick up one subview and rendered based on the criteria like this:

<h:panelGrid ...>

<f:subview id="page1" rendered="#{mybean.page == 'page1'}">

<jsp:include page="page1.jsp"/>

</f:subview>

<f:subview id="page2" rendered="#{mybean.page == 'page2'}">

<jsp:include page="page2.jsp"/>

</f:subview>

<f:subview id="page3" rendered="#{mybean.page == 'page3'}">

<jsp:include page="page3.jsp"/>

</f:subview>

...............

</panelGrid>

Each pageX.jsp has its own backing bean.

My problem is that even I selected one page (let say, page1), the other pages' backing bean were accessed because the render response is the last phase in the life cycle.

This causes some performance problems.

I tried to use jsp's c:choose/c:when. But myBean.page has no value since it happened before apply request values phase.

Any better ways to avoid this?

Thanks in advance.

[1301 byte] By [johnmiana] at [2007-11-27 1:48:02]
# 1
Check http://balusc.xs4all.nl/srv/dev-jep-djs.html for a better approach.
BalusCa at 2007-7-12 1:11:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Thanks a lot BalusC. It is a good way to solve the problem. But it needs a lot of code changes and page scope changes.Are there a better way to solve this problem without changing the existing codes?
johnmiana at 2007-7-12 1:11:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...