Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8DR#2, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description

      JSF state saving is a mechanism that aids in failover implementation. On any page, the component structure and state are saved to either the client or to the session, but a key that enables restoring the state is always written to the client. In this way, the client request can be redirected to a failover server, and as long as the session has been duplicated, the original page state and structure can be restored for the request.

      Currently, we maintain the component state and structure in our own proprietary way which necessitates propagating the entire framework object structure to the failover node.

        Issue Links

          Activity

          Greg Dick created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Fix Version/s 1.7.2 [ 10130 ]
          Assignee Priority P2
          Affects Version/s 1.7.1 [ 10122 ]
          Assignee Greg Dick [ greg.dick ]
          Ken Fyten made changes -
          Link This issue blocks ICE-3083 [ ICE-3083 ]
          Hide
          Greg Dick added a comment -

          Progress on this issue is at about 80-90%. State is being saved in the session, the key to restoring state is being written to the client, and the key is found and identified if passed back in a request and can be used to restore state. State is apparently restored. Apparently is the term used because it's not completely obvious if it is restored or not, none of our applications seem to require it.

          At this stage one remaining issue is that when the form is restored, the id changes, and something causes all the forms children to be rendered. Currently these aren't being diff'd out, with the result that the update contains all the children, meaning that if you are typing something in an input text, it's erased. There have been a couple of changes that could be responsible for this changed behaviour so I'm still working on that.

          Show
          Greg Dick added a comment - Progress on this issue is at about 80-90%. State is being saved in the session, the key to restoring state is being written to the client, and the key is found and identified if passed back in a request and can be used to restore state. State is apparently restored. Apparently is the term used because it's not completely obvious if it is restored or not, none of our applications seem to require it. At this stage one remaining issue is that when the form is restored, the id changes, and something causes all the forms children to be rendered. Currently these aren't being diff'd out, with the result that the update contains all the children, meaning that if you are typing something in an input text, it's erased. There have been a couple of changes that could be responsible for this changed behaviour so I'm still working on that.
          Frank Ye made changes -
          Link This issue blocks ICE-3442 [ ICE-3442 ]
          Hide
          Greg Dick added a comment -

          That problem turned out to be that the view state key was changing in the form. It turns out that ICEfaces updates can only be applied to an element with an id so the code ascends the hierarchy until it finds the first element with an id (which is the form) and inserts that into the update queue. This causes all the children of the form to be sent.

          The solution to this problem was to encase the <input> tag containing the View state key in a div tag that has an id. I don't want to monkey with the results of the JSF code that is generating the <input> tag.

          Moving on to the next problem, trying the code in the auction monitor example application. Again the application has some form of problem where the body tag is modified and the entire page is resent. This problem was traced back to the UIXHtmlComponent representing the DIV tags for "chat_content" and "auction_content". This component is not saving its state properly, and as a result, the rendered ID wasn't being preserved. This was causing the DOM id's in the old and new DOM to be different resulting in the parent node (body) being sent. Note that the ID of the component itself is correctly restored, but not the rendered ID.

          There may be some components that don't support saveState and restoreState at all, plus perhaps some that don't support the methods properly. The following packages are suspect in that they exist, but a search doesn't reveal any saveState or restoreState methods. It well may be that they don't need to support these methods, etc.

          component\src\com\icesoft\faces\component\

          drag-drop
          gmap
          input rich text
          menu-bar
          menu-popup
          panel divider
          panel tool tip
          output style

          however output style is definitely a problem, as the DOM (in auction Monitor application) before state saving has 7 elements, and the DOM after restoration has 5 elements with the 2 missing elements being links to style files.

          May need to get some component support for this operation.

          Show
          Greg Dick added a comment - That problem turned out to be that the view state key was changing in the form. It turns out that ICEfaces updates can only be applied to an element with an id so the code ascends the hierarchy until it finds the first element with an id (which is the form) and inserts that into the update queue. This causes all the children of the form to be sent. The solution to this problem was to encase the <input> tag containing the View state key in a div tag that has an id. I don't want to monkey with the results of the JSF code that is generating the <input> tag. Moving on to the next problem, trying the code in the auction monitor example application. Again the application has some form of problem where the body tag is modified and the entire page is resent. This problem was traced back to the UIXHtmlComponent representing the DIV tags for "chat_content" and "auction_content". This component is not saving its state properly, and as a result, the rendered ID wasn't being preserved. This was causing the DOM id's in the old and new DOM to be different resulting in the parent node (body) being sent. Note that the ID of the component itself is correctly restored, but not the rendered ID. There may be some components that don't support saveState and restoreState at all, plus perhaps some that don't support the methods properly. The following packages are suspect in that they exist, but a search doesn't reveal any saveState or restoreState methods. It well may be that they don't need to support these methods, etc. component\src\com\icesoft\faces\component\ drag-drop gmap input rich text menu-bar menu-popup panel divider panel tool tip output style however output style is definitely a problem, as the DOM (in auction Monitor application) before state saving has 7 elements, and the DOM after restoration has 5 elements with the 2 missing elements being links to style files. May need to get some component support for this operation.
          Ken Fyten made changes -
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Fix Version/s 1.7.2 [ 10130 ]
          Ken Fyten made changes -
          Fix Version/s 1.8DR#2 [ 10142 ]
          Fix Version/s 1.7.2RC1 [ 10140 ]
          Frank Ye made changes -
          Link This issue blocks ICE-3601 [ ICE-3601 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17800 Tue Oct 21 14:14:34 MDT 2008 greg.dick ICE-3422 JSF state saving
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/util/CoreUtils.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17801 Tue Oct 21 14:15:19 MDT 2008 greg.dick ICE-3422 Initial check in
          Files Changed
          Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/SettableLocaleViewRoot.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17802 Tue Oct 21 14:15:47 MDT 2008 greg.dick ICE-3422 Implement JSF state saving
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17803 Tue Oct 21 14:16:38 MDT 2008 greg.dick ICE-3422 Implement JSF state saving
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeExternalContext.java
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17804 Tue Oct 21 14:17:10 MDT 2008 greg.dick ICE-3422 Implement JSF state saving
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17805 Tue Oct 21 14:17:53 MDT 2008 greg.dick ICE-3422 Implement JSF state saving
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
          Deryk Sinotte made changes -
          Assignee Priority P2 P1
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17882 Mon Nov 10 11:50:19 MST 2008 greg.dick ICE-3422 Use JSF API to get StateManager rather than JSF specific implementation
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #17883 Mon Nov 10 13:22:38 MST 2008 mark.collette ICE-3422 : Implement JSF state saving
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
          Hide
          Mark Collette added a comment -

          There was a NPE, on the second postback, with state saving turned on.

          On the initial GET, context.getExternalContext().getRequestParameterMap().get("javax.faces.RenderKitId") is null, as expected. On the initial postback, it returns "ICEfacesRenderKit", as expected. But, on the second postback, it return "", which the code didn't account for. It assumes null or a valid renderKitId. I changed the ICEfaces code to treat an empty String like a null.

          Subversion 17883
          icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java

          Show
          Mark Collette added a comment - There was a NPE, on the second postback, with state saving turned on. On the initial GET, context.getExternalContext().getRequestParameterMap().get("javax.faces.RenderKitId") is null, as expected. On the initial postback, it returns "ICEfacesRenderKit", as expected. But, on the second postback, it return "", which the code didn't account for. It assumes null or a valid renderKitId. I changed the ICEfaces code to treat an empty String like a null. Subversion 17883 icefaces\core\src\com\icesoft\faces\application\D2DViewHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18028 Fri Dec 12 09:49:18 MST 2008 greg.dick ICE-3422 Removed half state saving in Seam
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18029 Fri Dec 12 09:50:39 MST 2008 greg.dick ICE-3422 Now this object inserts StateSaving markers into the DOM and doesn't depend on writeState implementation in ViewHandler
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18030 Fri Dec 12 09:53:26 MST 2008 greg.dick ICE-3422 now copies set aside state to Marker nodes within DOM
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18031 Fri Dec 12 09:54:21 MST 2008 greg.dick ICE-3422 Do stateSaving work after renderResponse but before document is ended
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/facelets/D2DFaceletViewHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18032 Fri Dec 12 09:57:01 MST 2008 greg.dick ICE-3422 Restored method used in InputFile Iframe rendering
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18033 Fri Dec 12 09:58:25 MST 2008 greg.dick ICE-3422 Refactored use of JSF state saving to be after the renderResponse method has returned.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18034 Fri Dec 12 10:22:08 MST 2008 greg.dick ICE-3422 Remove saved state nodes on endDocument
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java
          Ken Fyten made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Priority P1
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Salesforce Case []
          Affects [Documentation (User Guide, Ref. Guide, etc.)]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18075 Wed Dec 17 13:47:00 MST 2008 greg.dick ICE-3422 Get state saving location from context params and save in CoreUtils.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18076 Wed Dec 17 13:48:20 MST 2008 greg.dick ICE-3422 Throw UnsupportedOperationException on clients trying to get an async renderer when Client side state saving is enabled.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/async/render/RenderManager.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #18078 Wed Dec 17 14:20:39 MST 2008 greg.dick ICE-3422 Support value for serverStateSaving for later checking by clients without access to Config params
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/util/CoreUtils.java
          Ken Fyten made changes -
          Fix Version/s 1.8 [ 10161 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Greg Dick [ greg.dick ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Greg Dick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: