0

I am using two lists that are bound to the same backing bean variable. It is rendering fine but the value that a user selects does not get set in the bean.

<h:selectOneMenu value="#{userData.data}" rendered="#{userData.show1}">
    <f:selectItem itemValue="1" itemLabel="Item 1" />
    <f:selectItem itemValue="2" itemLabel="Item 2" />
</h:selectOneMenu>

<h:selectOneMenu value="#{userData.data}"rendered="#{!userData.show1}">
    <f:selectItem itemValue="3" itemLabel="Item 3" />
    <f:selectItem itemValue="4" itemLabel="Item 4" />
</h:selectOneMenu>
  • 1
    Does this `rendered="#{userData.true}"` compile either? You can neither have a property/field in the associated backing bean `UserData` whose name is `true`. – Tiny Mar 11 '15 at 17:20
  • show1 is a boolean in the bean whose value is set according to some preconditions – Nupur Rawat Mar 11 '15 at 17:39

0 Answers0