dear all,
I have a drop down list in my application linked with another.
I would like to reset to the default value the second drop down list according to the value selected in the first drop down.
Here first drop down with its valueChangeListener
<h:selectOneMenu id="idSourcingType" valueChangeListener="#{sourcingTypeController.selectInputValueChanged}"
value="....">
<f:selectItems id="SlctSourcingTypeItms" value="#{applicationDefaultDataController.allSourcingTypes}"/>
</h:selectOneMenu>
Here the second drop down to reset to default value
<h:selectOneMenu id="idEventCountry" binding="#{sourcingTypeController.eventCoutriesComponent}">
<f:selectItems id="SlctEventCountryItms" value="#{applicationDefaultDataController.eventCountries}"/>
</h:selectOneMenu>
The problem is there is no link between my two classes: sourcingTypeController and applicationDefaultDataController.
I can access to the applicationDefaultDataController.eventCountries.
The applicationDefaultDataController is a backing bean in session scope use to fill all componants of the application.
I try by using the binding like following:
SelectItem[] eventCountriesArray = this.eventCoutriesComponent.getSelectItems();
but I have no way to set the SelectItem[] updated.
Any idea? Any advice?
Edited by: eliselavy on Sep 24, 2008 8:47 AM