[
https://jira.jboss.org/jira/browse/JBSEAM-1922?page=com.atlassian.jira.pl...
]
Pete Muir commented on JBSEAM-1922:
-----------------------------------
That should probably just be a documentation note
the RI added a param to serialize the view state.
we should probably just mention it.
Back button doesn't work with PAGE scope and JSF-RI Server state
saving
-----------------------------------------------------------------------
Key: JBSEAM-1922
URL:
https://jira.jboss.org/jira/browse/JBSEAM-1922
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Michael Youngstrom
Fix For: 2.1.0.GA
JSF doesn't make any guarentees about the isolation of attributes stored in the view.
Because of this a PAGE scoped component that gets passed along to several views will
actually be a single instance when using Server state management with the RI.
This causes a problem with back button support for the PAGE scope (imho the main
difference of PAGE scope over CONVERSATION). For example:
@Name("test")
@Scope(PAGE)
public class Test implements Serializable {
private int value = 0;
public int getValue() {
return value;
}
public void incValue() {
value++;
}
}
Value = #{test.value}
<h:form>
<h:commandButton action="#{test.incValue}" value="Increment
Value"/>
</h:form>
Test Case when using Server side state management:
1. I view the page: "Value = 0" Displayed
2. I press "Increment" button: "Value = 1"
3. I press "Increment" button: "Value = 2"
4. I press "back" button: "Value = 1"
5. I press "Increment" button: "Value=3"
If running in client state mode Step 5 displays "Value=2".
To make PAGE scope work consistently between client and server JSF state management we
need to figure out some way to serialize PAGE scoped values when doing
"saveState" or something so that a new instance of PAGE is accessed from
restore-view of any subsequent requests.
Here is a link to a conversation on the RI about this issue:
https://javaserverfaces.dev.java.net/servlets/BrowseList?list=dev&by=...
From the conversation it appears the MyFaces is not effected by this issue by default.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira