I have a jsf page, that includes other pages depend on application state:
<t:div rendered="#{mainMenuHandler.results}">
<[EMAIL PROTECTED] file="results.jsp"%>
</t:div>
<t:div rendered="#{mainMenuHandler.orders}">
<[EMAIL PROTECTED] file="orders.jsp"%>
</t:div>
<t:div rendered="#{mainMenuHandler.patientData}">
<[EMAIL PROTECTED] file="patientData.jsp"%>
</t:div>
results.jsp, orders.jsp, patientData.jsp have many jsp code. And it
executed even if rendered attribute is false. So I decide rewrite this
to follow code:
<% MainMenuHandler mainMenuHandler = ... ;%>
<% if (mainMenuHandler.isResults()) { %>
<t:div >
<[EMAIL PROTECTED] file="results.jsp"%>
</t:div>
<% } %>
<% if (mainMenuHandler.isOrders()) { %>
<t:div >
<[EMAIL PROTECTED] file="orders.jsp"%>
</t:div>
<% } %>
<% if (mainMenuHandler.isPatientData()) { %>
<t:div >
<[EMAIL PROTECTED] file="patientData.jsp"%>
</t:div>
<% } %>
But when status is changed (for example isResults() switch from false to
true) I recieved an error: "Component with dublicate id in tree ...".
Is this a bug in my-faces or tree structure in jsf page can't be changed
dynamically?