You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Alin Dosoniu <ad...@hotmail.com> on 2005/02/04 23:08:00 UTC

onchange attribute of h:selectOneMenu

Hello,

With 1.0.7 I used the following code to make a call to the server in order to fill other controls from the same form with different values.
<h:selectOneMenu id="year" value="#{dateBean.year}" required="true" onchange="this.form.submit();">
            <f:selectItems id="years" value="#{dateBuss.years}" />
</h:selectOneMenu>

With 1.0.8 this is not working. The request to the server is made, but when the page is reloaded the year control have its previous value selected instead of the new one.
In fact, none of the items from <select> tag does not have the selected set with true. So, the first item from the list is always selected.
Does anyone have the same problem? Is there an workaround?

Thanks in advance,
Alin.