Given: one input and one clickable input (e.g. radio button). Change of a re-renders b.
<h:form id="rootForm">
<h:inputText id="a" value="#{fooBB.a}">
<f:ajax render="a b"/>
</h:inputText>
<h:selectOneRadio id="b" value="#{fooBB.b}">
<f:selectItem itemValue="x" itemLabel="x"/>
<f:selectItem itemValue="y" itemLabel="y"/>
<f:ajax/>
</h:selectOneRadio>
</h:form>
I put the cursor into field A, change the value without submitting, then click on one of the radio buttons that is not the current value (i.e.: generating an additional change event on the selectOneRadio)
Then one of the following happens (possibly depending how fast I release the mouse button):
- a is submitted, change to b is lost (no ajax request for b)
- a is submitted, change to b is lost (ajax request for b having same javax.faces.ViewState as ajax request of a)
In both cases, the mouse click is lost which is very annoying.
Since this is only one form and JSF 2.2, I do not expect this to be some javax.faces.ViewState-not-getting-updated problem (tried most of the workarounds, though).
Using myfaces-2.2.11 (on Wildfly 8.1)
Is there a workaround, did I do something wrong or do I have to live with it?
edit: updated example to incorporate Kukeltjes improvement