selectOneMenu valueChangeListener with onchange=
Can anyone provide some insight into what I'm getting when using both valueChangeListener with onchange="submit()"? Both are needed in my app to cause a form change when a selectOneMenu item is selected.
After the page is initially loaded and making a menu selection, the selected menu item does not show and no action occurs. Watching the backing bean code, the listen method is not even called. Everything works as expected the second time a menu selection is made.
When the onchange="submit() statement is removed, the first menu selection will show in the menu, but, of course, the action upon value change does not occur.
Now I understand that JSF performs lazy instantiation and wonder if this is involved. But the menu choices are available for selection after the page loads, it's the listen method that doesn't get called the first time.
This is my selectOneMenu code:
<h:selectOneMenu id="locationSelection"
valueChangeListener="#{SelectBean.onLocationChange}"
onchange="submit()" >
<f:selectItems id="locationSelects" value="#{SelectBean.locationSelects}" >
</h:selectOneMenu>

