Skip to main content

Multiple Composite Components Attached to One Controller

1 reply [Last post]
dperriero
Offline
Joined: 2010-03-23
Points: 0

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.

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

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dperriero
Offline
Joined: 2010-03-23
Points: 0

I didn't see the forest before the trees and thus neglected to think pragmatically.

All I had to do was to extend the controller to fit each component scenario.

i.e.
would bind to PanelOneController and
would bind to PanelTwoController.

Short and sweet.

Hope this helps other people!

Thanks,
Derek