• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

SelectOneMenu - Validation Error: Value is not valid

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic