JSF 2 adding a composite components to the view from a managed bean?
Is it possible to programatically add a composite component (defined in a xhtml file) to the view ?
So I have a custom component defined in resources/components/mycomponent.xhtml
<br /> ...</p> <p>...<br />
And I would like to add it to a view programatically from a managed bean using something like:
<br /> ...<br /> UIComponent composite = app.createComponent(context,"components/mycomponent.xhtml");<br /> composite.getAttributes().put("foo","bar");<br /> context.findComponent("form").getChildren().add(composite);<br /> ...<br />
Is this possible?