Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this possible?

A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • 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}"
onchange="this.form.submit()" immediate="true" >
<f:selectItems value="#{airportHandler.airports}" />

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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic