You can probably do it by setting the binding attribute to a backing
bean (use UIComponent or UIInput as your accessor type), and then
providing the appropriate kind of object via the getComponent()
method.  I think you're required to set an id programmically if you
create a component programmically.

But honestly, I don't see why you wouldn't use the rendered attribute
if you're toggling between conditions and simply configure both
components using page code.

On 2/7/07, K. Johnson <[EMAIL PROTECTED]> wrote:

Is there a way for me to add a component or change a component type dynamicaly 
using the view root?

For example, if I want to display a facelet page with either selectOneMenu 
component or an inputText component depending on some condition?

I do not want the logic implemented inside the page using a c:if or other tag, 
i want to handle all of it from within the java code...

Any help is appreciated!


Reply via email to