Details
Description
I think that we have a problem with our state saving. I took some code from Sun's StateManagerImpl, where it restores the view, to see how it accesses the saved state. I noticed that, for subsequent post-backs to a single view, we appear to be accumulating saved state into the session.
I added the following lines to the end of D2DViewHandler.writeState(FacesContext):
// javax.faces.render.ResponseStateManager.VIEW_STATE_PARAM
String ResponseStateManager__VIEW_STATE_PARAM = "javax.faces.ViewState";
Object pValue = context.getExternalContext().
getRequestParameterMap().get(ResponseStateManager__VIEW_STATE_PARAM);
System.out.println("pValue: " + pValue);
// The value com.sun.faces.application.StateManagerImpl uses
String LOGICAL_VIEW_MAP = "com.sun.faces." + "logicalViewMap";
Map logicalMap = (Map) context.getExternalContext().getSessionMap().get(LOGICAL_VIEW_MAP);
System.out.println("logicalMap: " + logicalMap);
I then clicked around in the component showcase several times, each time it printed out two lines:
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id2=[Ljava.lang.Object;@f036de, j_id3=[Ljava.lang.Object;@c50443}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id2=[Ljava.lang.Object;@f036de, j_id4=[Ljava.lang.Object;@1a6d5e1}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id2=[Ljava.lang.Object;@f036de, j_id
5=[Ljava.lang.Object;@c5c0e5}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
2=[Ljava.lang.Object;@f036de, j_id6=[Ljava.lang.Object;@1e1dfb2}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
6=[Ljava.lang.Object;@1e1dfb2, j_id2=[Ljava.lang.Object;@f036de, j_id7=[Ljava.lang.Object;@163058b}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
6=[Ljava.lang.Object;@1e1dfb2, j_id7=[Ljava.lang.Object;@163058b, j_id2=[Ljava.lang.Object;@f036de, j_id8=[Ljava.lang.Object;@15fd309}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
6=[Ljava.lang.Object;@1e1dfb2, j_id7=[Ljava.lang.Object;@163058b, j_id8=[Ljava.lang.Object;@15fd309, j_id2=[Ljava.lang.Object;@f036de, j_id9=[Ljava.lang.Ob
ject;@1b8c5e3}}
I added the following lines to the end of D2DViewHandler.writeState(FacesContext):
// javax.faces.render.ResponseStateManager.VIEW_STATE_PARAM
String ResponseStateManager__VIEW_STATE_PARAM = "javax.faces.ViewState";
Object pValue = context.getExternalContext().
getRequestParameterMap().get(ResponseStateManager__VIEW_STATE_PARAM);
System.out.println("pValue: " + pValue);
// The value com.sun.faces.application.StateManagerImpl uses
String LOGICAL_VIEW_MAP = "com.sun.faces." + "logicalViewMap";
Map logicalMap = (Map) context.getExternalContext().getSessionMap().get(LOGICAL_VIEW_MAP);
System.out.println("logicalMap: " + logicalMap);
I then clicked around in the component showcase several times, each time it printed out two lines:
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id2=[Ljava.lang.Object;@f036de, j_id3=[Ljava.lang.Object;@c50443}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id2=[Ljava.lang.Object;@f036de, j_id4=[Ljava.lang.Object;@1a6d5e1}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id2=[Ljava.lang.Object;@f036de, j_id
5=[Ljava.lang.Object;@c5c0e5}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
2=[Ljava.lang.Object;@f036de, j_id6=[Ljava.lang.Object;@1e1dfb2}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
6=[Ljava.lang.Object;@1e1dfb2, j_id2=[Ljava.lang.Object;@f036de, j_id7=[Ljava.lang.Object;@163058b}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
6=[Ljava.lang.Object;@1e1dfb2, j_id7=[Ljava.lang.Object;@163058b, j_id2=[Ljava.lang.Object;@f036de, j_id8=[Ljava.lang.Object;@15fd309}}
pValue: j_id1:j_id2
logicalMap: {j_id1={j_id3=[Ljava.lang.Object;@c50443, j_id4=[Ljava.lang.Object;@1a6d5e1, j_id5=[Ljava.lang.Object;@c5c0e5, j_id
6=[Ljava.lang.Object;@1e1dfb2, j_id7=[Ljava.lang.Object;@163058b, j_id8=[Ljava.lang.Object;@15fd309, j_id2=[Ljava.lang.Object;@f036de, j_id9=[Ljava.lang.Ob
ject;@1b8c5e3}}
Issue Links
- blocks
-
ICE-3842 InputFile state getting lost
- Closed
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Mark Collette
created issue -
Mark Collette
made changes -
Deryk Sinotte
made changes -
Salesforce Case | [] | |
Assignee Priority | P1 | |
Assignee | Greg Dick [ greg.dick ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 1.8DR#2 [ 10142 ] |
Greg Dick
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] | |
Assignee Priority | P1 |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Greg Dick [ greg.dick ] |