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
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17995 | Fri Dec 05 15:05:26 MST 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17994 | Fri Dec 05 15:04:56 MST 2008 | greg.dick | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
|