| Author |
creating JSF components at runtime
|
JP Estrada
Ranch Hand
Joined: Mar 21, 2006
Posts: 47
|
|
I know this is possible... but how is it done? Any links to tutorials or sample codes would be very helpful.
|
 |
Solmaz Anvar
Greenhorn
Joined: Jul 14, 2005
Posts: 26
|
|
Yes. It is possible to add components dynamically. Create a container bean like this one: public class ComplexBean { protected UIComponent component; public ComplexBean() { component = new UIPanel(); } public UIComponent getComponent() { return component; } public void setComponent(UIComponent component) { this.component = component; } } Use component instance binding in your page, for instance <h anelGrid binding="#{ComplexBean.component}"/> (The bean should be configured as a managed bean). Now if you add components to your ComplexBean.getComponent(), they will appear on the page. Regards Solmaz  [ April 07, 2006: Message edited by: Solmaz Anvar ]
|
Solmaz Anvar
|
 |
JP Estrada
Ranch Hand
Joined: Mar 21, 2006
Posts: 47
|
|
|
thanks solmaz!
|
 |
 |
|
|
subject: creating JSF components at runtime
|
|
|