Rob Micah wrote:I have a bean that holds an array of Object parameters. When I render the view I want to choose between using a textbox or a select list for each one of those objects based on their attributes. At first glance this appeared to be simple using JSTL tags but after reading that JSTL tags evaluate only to build the component tree and not to render it, I don't think it will work (ref: http://www.ninthavenue.com.au/blog/c:foreach-vs-ui:repeat-in-facelets).
So how can I accomplish this using JSF?
as I understand you want to choose the component to be rendered based on some condition? Almost all jsf tags have such an attribute as rendered, where you can specify whether to render that component or not. So in your backing bean you have to write a property(means jsf property as getXXX() or isXXX()) and use it in rendered attribute.
In your situation it will look like this:
where
is method in your backing bean which determines whether to render the specified component or not