There was already a "if-else" discussion, look for it. You should put both of them (outputText and commandLink) on the page and write a logic for "rendered" in your backing bean.
Jozef.

Matthias Klein wrote:

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


__________ Informacia od NOD32 1.1237 (20050929) __________

Tato sprava bola preverena antivirusovym systemom NOD32.
http://www.eset.sk



__________ Informacia od NOD32 1.1237 (20050929) __________

Tato sprava bola preverena antivirusovym systemom NOD32.
http://www.eset.sk




Reply via email to