0

I have a selectOneMenu and below it I have a selectManyListbox . Based on what user has selected in selectOneMenu , I want to refresh selectManyListbox . Like for example say selectOneMenu has list of Students and selectManyListbox has list of Courses. So for example in this scenario, say if I select Student1 then automatically selectManyListbox should show Course1, Course9 as selected. If I change selectOneMenu to student2 then accordingly selectManyListbox should show his courses as selected ones. What would be the general strategy of doing this?.

user1525825
  • 269
  • 1
  • 3
  • 14

1 Answers1

0

You could fire a change in selectOneMenu and fill the selectManyListBox's value.

<f:ajax event="change"/> 

or if you are using primefaces, you could use <p:ajax event="change"/>

See link

Community
  • 1
  • 1
mehere
  • 1,487
  • 5
  • 28
  • 50