ICEfaces
  1. ICEfaces
  2. ICE-2139

Postback token mistakenly inserted into non JSF requests

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.3, 1.7DR#1, 1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      JSF (not myfaces)

      Description

      There is code that inserts an object into the request parameter map in the update method, in the PortletExternalContext, and the ServletExternalContext. This correctly triggers the logic in the JSF restoreView implementation class to treat the request as a postback. The problem is, update is being called on both partial and fresh non-jsf GET requests, essentially making everything a postback.

      One of the symptoms of this problem are Seam DataModel objects no longer working. In some rare instances, Seam example code has the following type of behaviour:

      User clicks on an item from a data table,
      seam link tag causes a redirect from the table item to the same page
      the UI now displays the contents of the chosen record on the same page

      This type of interaction would be broken because after the redirect, the phases that are supposed to be executed are restoreView, which will cause a new viewRoot to be created, and renderResponse, since we have a brand new View.

      In our case, the postback token causes the view to be restored, and the full JSF lifecycle is executed. As part of the full lifecycle, the DataModel data holding objects get cleared, and the visible result is that no matter what record the user clicks in the dataTable, only the first record is ever displayed, edited, deleted, etc.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15202 Thu Nov 15 14:30:44 MST 2007 greg.dick ICE-2139 Removed call to insertPostbackToken.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ServletExternalContext.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15059 Wed Oct 31 12:31:47 MDT 2007 greg.dick ICE-2139 DO insert the postback key in the updateOnXMLHttpRequest method, since we know at that point any given request is a postback
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/core/src/com/icesoft/faces/context/View.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15057 Wed Oct 31 12:30:21 MDT 2007 greg.dick ICE-2139 Consume the Seam viewroot shortcut key in the createView method as well. JSF doesn't necessarily call restoreView first, so consuming it only in that method will not always remove it properly.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/core/src/com/icesoft/faces/application/D2DViewHandler.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15056 Wed Oct 31 12:29:06 MDT 2007 greg.dick ICE-2139 Dont automatically insert postback token in all invocations of update(), since that gets called on initial view construction too, and those aren't postbacks.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ServletExternalContext.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #15055 Wed Oct 31 12:28:39 MDT 2007 greg.dick ICE-2139 Dont automatically insert postback token in all invocations of update(), since that gets called on initial view construction too, and those aren't postbacks.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.6/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/PortletExternalContext.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14857 Mon Sep 24 11:08:57 MDT 2007 greg.dick ICE-2139 do insert postback key when we're clear the request is a postback
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14856 Mon Sep 24 11:08:10 MDT 2007 greg.dick ICE-2139 dont insert postback token in update method
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/ServletExternalContext.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #14855 Mon Sep 24 11:07:38 MDT 2007 greg.dick ICE-2139 dont insert postback token in update method
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/PortletExternalContext.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: