• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Is this possible?

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 2 drop down boxes, the 2nd is populated based on the 1st's value like so -

<h:selectOneMenu value="#{airportHandler.airport}"
valueChangeListener="#{airportHandler.changeDestinationAirports}"
onchange="this.form.submit()" immediate="true" >
<f:selectItems value="#{airportHandler.airports}" />
</h:selectOneMenu>

so changeDestinationAirports populates a list object which the 2nd one uses!

The trouble is changeDestinationAirports is fired BEFORE the airportHandler.airport setter so airport does not show the current selected value - I can set this in the handler before I populate the list object for the 2nd drop down but is there anyway to get JSF to call the setter before the valueChangeListener gets fired?

thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic