[jsr-314-open] Ajax: Include View State For Forms That Are Partial Render Targets

Roger Kitain Roger.Kitain at Sun.COM
Fri Jun 19 15:07:41 EDT 2009


Background:

It used to be that when processing an Ajax response on the client, all forms in the view
would get updated with the view state from the server (which had it's own set of portlet
related issues).  Before the specification went final it was decided that only the 
submitting form should have it's view state updated from the server.

Problem:

Consider the case where there are multiple forms in the view, and one of the forms
is a partial render target.  So here, "form1" is an Ajax render target:

<h:form id="form1">
   <h:commandButton value="Should be postback" id="button1"/>
</h:form>

<h:form id="form2">
   <h:commandButton value="Rerender form1" id="button2">
      <f:ajax render=":form1"/>
   </h:commandButton>
</h:form>

In this scenario, "form1" is missing the view state identifier causing a
"non postback" when "button1" is clicked.

-----------------------

I think this could get by as an errata for the MR, as we would need to include additional
spec language.

The fix is trivial, but I wanted to run this by the rest of the group.

See:

https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1116










More information about the jsr-314-open-mirror mailing list