I have a problem with listener not being invoked in the below selectOneMenu
<h:selectOneMenu id="Country" value="#{bean.country}">
<f:ajax render="inputId" listener="#{backingBean.clearMethod}" />
<f:selectItem itemLabel="-Select One-" itemValue="_" noSelectionOption="true"/>
<f:selectItems value="#{optionValues['countryList']}" />
</h:selectOneMenu>
<h:inputText id="inputId" value="#{bean.city}"/>
The optionValues resolver is used to resolve a country list options from an xml file.
It has USA, Canada and Mexico. My problem is when I change the option from USA to Canada or Select One to USA, the clearMethod
is invoked. But When I change the option from USA to Select One, the clearMethod
is not invoked.
Any help would be appreciated.