Affects Version/s: 2.2 Sprint 12
Fix Version/s: None
As per the work done for this spec change, http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-220, the id of each hidden ViewState element is supposed to be unique on the page. This should hold true for multiple forms in a single view as well as multiple views on the page (e.g. portlets). The documentation in ResponseStateManager indicates that this should be done by setting the id to be:
I have attached a test case which has two forms on it. The resulting ViewState elements both have identical ids:
ViewState for form1: j_id1:javax.faces.ViewState:0
ViewState for form2: j_id1:javax.faces.ViewState:0
The counter is not incremented and the id of the form (which should be the naming container in this case) is not used.
Also, I noticed that the method for getting the ViewState id is com.sun.faces.util.Util.getViewStateId(FacesContext fc). For those of us working on extending the framework who might need access to the information in their own renderers, will there be a way to get at the information in a more public way?
|Assignee||Ed Burns [ edburns ]|
|Priority||Major [ 3 ]||Trivial [ 5 ]|
|Priority||Trivial [ 5 ]||Major [ 3 ]|