Is it possible to handle items in a list conditionally?

What I mean is this:

In my Backing Bean I have a Collection of ItemBeans.
Each of those ItemBeans contains a boolean property such as "isSomething".

I would now like to display this Collection through a dataTable or dataList
of commandLinks. (The result is essentially a simple list of links)

Thus far it's easy.

BUT now I want to treat the items differently depending on the "isSomething"
flag:
All Items with the flag set "true" are supposed to be "outputText" instead
of "commandLink" (so a User can't click on that item) and may be rendered
with a different color.

Is that possible? (If it is easier to tag the "special" items in a different
way, I can do that. I am not set on the boolean isSomething property)

Thanks

Matt

Reply via email to