| Author |
SelectOneMenu - Validation Error: Value is not valid
|
Diego Gomes Araujo
Greenhorn
Joined: Nov 01, 2010
Posts: 4
|
|
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:
estadoBean
cidadeBean
administradorBean
administradores.xhtml
Anyone know how I can fix it?
|
 |
Brendan Healey
Ranch Hand
Joined: May 12, 2009
Posts: 218
|
|
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.
Brendan.
|
 |
 |
|
|
subject: SelectOneMenu - Validation Error: Value is not valid
|
|
|