TheCoder4eu / BootsFaces-OSP

BootsFaces - Open Source Project
Apache License 2.0
246 stars 102 forks source link

<b:selectOneMenu> bug with onchange event #203

Closed PereBG closed 8 years ago

PereBG commented 8 years ago

The event onchange is not applied to the rendered component. In the following example another event, for example, onblur is rendered correctly

<b:selectOneMenu value="#{mybean.idMatchDay}" id="matchDays"  onblur="generate();"> 
    <f:selectItems value="#{mybean.matchDays}" var="matchDayVar" 
    itemValue="#{matchDayVar.id}" itemLabel="#{matchDayVar.nom}" />
</b:selectOneMenu>
<select onblur="generate();" class="form-control" name="userPredictionForm:matchDays" id="userPredictionForm:matchDays">
...
</select>

Otherwise with onchange the event is not rendered in the component

<b:selectOneMenu value="#{mybean.idMatchDay}" id="matchDays" onchange="generate();">
    <f:selectItems value="#{mybean.matchDays}" var="matchDayVar" 
    itemValue="#{matchDayVar.id}"  itemLabel="#{matchDayVar.nom}" /> 
</b:selectOneMenu>
<select class="form-control" name="userPredictionForm:matchDays" id="userPredictionForm:matchDays">
...
</select>
stephanrauh commented 8 years ago

Would you mind to have a look at version 0.8.0? Currently, it's only a developer preview that's available at the Snapshot directory of Maven Central (see #151 on how to get it).

The AJAX demo at http://bootsfaces.net/Staging/forms/ajax.jsf show the blur event, so I'm positive your bug has already been solved. But still, please report back.

PereBG commented 8 years ago

Hi, I've tested in version 0.8 and the bug is fixed. Thanks for your reply.

stephanrauh commented 8 years ago

Great, thanks!