views:

1099

answers:

2

I want to do something along the lines of the following but when I use it like this I get a parse error telling me an entity needs to directly follow the '&' character:

<ice:selectManyCheckbox
rendered="#{!bean1.condition1 && bean2.condition2}"
value="#{bean1.selected}">
<f:selectItems value="#{bean2.items}" />
</ice:selectManyCheckbox>

How can I get rendered to check conditions from 2 different beans?

+3  A: 

Use 'and' instead:

    <ice:selectManyCheckbox rendered="#{!bean1.condition1 and bean2.condition2}" value="#{bean1.selected}">
karim79
Probably should have tried that before asking. Good to know though, thanks.
rojoca
A: 

karim79 is right, you can just use the and operator.

In addition to that, you can have a look to this page, which explains the Expression Language (EL) with several examples...

romaintaz