Cannot work out because, the viewstate is returned as separate viewstate block
(in both implementations the <update id="a"> does not pass the viewState in the
Now the specification says:
If an update element is found in the response with the identifier
locate and update the submitting form's javax.faces.ViewState value with the
CDATA contents from the response.
Which means in this special case that the viewState for form a is lost.
Mojarra has fixed this to some degree by setting the viewstate if a direct form
render on a happens.
However if you do following:
Mojarra also fails.
The problem here lies clearly with the spec, I am not sure why the viewstate is
only updated to the issuing form.
Either all forms must be updated or at least the forms which are processed both
within the execute and render parts.
I also opened a discussion on the open mailing list regarding this, since this is
a usecase which can happen quite often in a typical rich client scenario where a
lot of detachments can happen to satisfy ie6 and multiple forms are the norm if
you have floating frames.