I am having problems with ValueChangeListener attached to a dropdown list.
Here is the code:
<h:selectOneMenu 
value = "#{MultiFileSelectMgmtBean.selectedLocationName}" 
valueChangeListener = "#{MultiFileSelectMgmtBean.LocationChangeEvent}" 
onchange = "submit();" 
>
<f:selectItems 
value = "#{MultiFileSelectMgmtBean.locationsListItems}"> 
</f:selectItems>
</h:selectOneMenu>
And here is the backing bean:
protected List<SelectItem> locationsListItems;
...
public void LocationChangeEvent( ValueChangeEvent vce ) throws Exception
{
   selectedLocationName = (String) vce.getNewValue();
}
The problem is that 'selectedLocationName' gets a "11" or "13" value, even the dropdown list is populated with two strings "LocationTest1" and "LocationTest2".
What could be the problem with vce.getNewValue?
 
     
    