SelectOneMenu - Validation Error: Value is not valid
Diego Gomes Araujo
Joined: Nov 01, 2010
I'm having this problem!
I have two selectOneMenu
one with list of states
and other with a list of cities of selected state, this problem occurs this way.
I select the state then list the cities, but when submit my form, the bean that contains the id of my state and not load list of cities.
It's like the bean was created again!
the code below:
Anyone know how I can fix it?
Joined: May 12, 2009
I am trying to remember. I had a whole load of trouble with this myself years ago. Given
two selectOneMenus, the first needs a value change listener which updates a list which is
stored in backing bean (obviously). The first selectOneMenu also needs a child f:ajax tag
which render= the 2nd selectOneMenu. I could never make this stuff work with request
scoped beans, but it does work with view scoped beans. It's a bit late and I can't go on
further now but I'll check back, this is however a basic pattern for getting this to work,
but I may well have forgotten something. Try it.