webtier@glassfish.java.net

Multiple Composite Components Attached to One Controller

From: <webtier_at_javadesktop.org>
Date: Tue, 13 Apr 2010 05:35:01 PDT

I have a scenario where I want to render either one composite element or another composite element based upon a boolean flag. Each custom component's input components are bound to the controller.

<ui:fragment rendered="#{controller.displayFlag}">
   <ez:panelOne id="panelOne">
   </ez:panelOne>
</ui:fragment>

<ui:fragment rendered="#{controller.displayFlag}">
   <ez:panelTwo id="panelTwo">
   </ez:panelTwo>
</ui:fragment>

What is happening is that the HTML input field components are not being rendered when I use both of these fragments within the template. If I remove one of the fragments, the HTML is rendered perfectly.

I didn't think both fragments would bind to the component tree if there is a render flag controlling them.

Any ideas would be great.

Thanks,
Derek
[Message sent by forum member 'dperriero']

http://forums.java.net/jive/thread.jspa?messageID=396673