Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SelectOneMenu - Validation Error: Value is not valid  RSS feed

 
Diego Gomes Araujo
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!