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

        Hide
        Greg Dick added a comment -

        Back patched fixes to branch

        Show
        Greg Dick added a comment - Back patched fixes to branch
        Hide
        Greg Dick added a comment -

        Patched the following files back to the 1.6.2 branch.

        com.icesoft.faces.context.View
        com.icesoft.faces.application.D2DViewHandler
        com.icesoft.faces.webapp.http.servlet.ServletExternalContext
        com.icesoft.faces.webapp.http.portlet.PortletExternalContext

        Show
        Greg Dick added a comment - Patched the following files back to the 1.6.2 branch. com.icesoft.faces.context.View com.icesoft.faces.application.D2DViewHandler com.icesoft.faces.webapp.http.servlet.ServletExternalContext com.icesoft.faces.webapp.http.portlet.PortletExternalContext
        Hide
        Ken Fyten added a comment -

        Fixed.

        Show
        Ken Fyten added a comment - Fixed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: