you need to use the following pattern:

<h:panelGroup>
<h:outputText rendered="#{dataListValue.state}"/>
<h:commandLink rendered="#{!dataListValue.state}"/>
</h:panelGroup>

regards,

Martin

On 9/30/05, Matthias Klein <[EMAIL PROTECTED]> 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
>
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Reply via email to