Hi all,
I have a weird problem with h:selectOneMenu and a4j:support. I have the following code:
<a:region>
<h:selectOneMenu id="#{filterName}" value="#{lister[filterName]}"
styleClass="filterInput" >
<s:selectItems value="#{lister[filterValues]}" var="filterValue"
label="#{(not empty filterValue) ? filterValue : '*'}" />
<a:support event="onchange" reRender="#{tableName}"
status="globalAjaxStatus" />
</h:selectOneMenu>
</a:region>
The bean lister, and the string filterName are set in previous code. Let's say filterName has the value "bar".
The filter values are simple strings, and I add a null for "don't care".
Now, when I change the list, the String value of the "bar" attribute is updated as expected. The problem is when I leave the page, first the attribute is updated to its expected value, but then it is updated to null many times (!) during the update model values JSF phase. This of course causes problems when returning to the page. Also, if I remove the ajax region around the selectOneMenu, the "bar" attribute is first updated to its expected value then it is updated to null (again many times). I.e., without an Ajax region it is impossible to use the selectOneMenu component because the value is changed back to null again and again.
I only have the problem with RichFaces 3.1.1, with RichFaces 3.0.1 + Ajax4JSF 1.1.1 everything works as expected with or without the Ajax region.
I am using Seam2 CR2, but it does not matter whether the backing bean is in the session or conversation scope (conversation scope causes many problems with RichFaces 3.1.X). So the problem is probably not Seam-related.
Are there any ideas what could be the problem?