ICEfaces
  1. ICEfaces
  2. ICE-3609

Regression: The "Location" portlets demo no longer updates the Map portlet consistently.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.7.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Portlet Ajax Push

      Description

      The Map portlet is not updating in sync with the Find and Details portlets. It appears to update on the initial selection choice but not subsequent choices. This is a regression as the Location portlets demo works fine using the ICEfaces 1.7.1 libraries.

        Activity

        Deryk Sinotte created issue -
        Deryk Sinotte made changes -
        Field Original Value New Value
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Deryk Sinotte made changes -
        Fix Version/s 1.7.2 [ 10130 ]
        Assignee Priority P1
        Hide
        Deryk Sinotte added a comment -

        The checkin where this started to fail was 17584:

        [deryk] icefaces > svn diff -r17583:17584Index: core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
        ===================================================================
        — core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17583)
        +++ core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17584)
        @@ -220,7 +220,11 @@
        //facesContext.renderResponse() skips phase listeners
        //in JSF 1.2, so do a full execute with no stale input
        //instead

        • facesContext.getExternalContext().getRequestParameterMap().clear();
          + Map requestParameterMap =
          + facesContext.getExternalContext().getRequestParameterMap();
          + requestParameterMap.clear();
          + //Seam appears to need ViewState set during push
          + requestParameterMap.put("javax.faces.ViewState", "ajaxpush");
          } else { facesContext.renderResponse(); }

        This change was added to fix ICE-3532. The PersistentFacesState.execute method has undergone other changes since the, included some Seam specific modifications. The current code looks like this:

        Map requestParameterMap =
        facesContext.getExternalContext().getRequestParameterMap();
        requestParameterMap.clear();
        if (SeamUtilities.isSeamEnvironment())

        { //ICE-2990/JBSEAM-3426 must have empty requestAttributes for push to work with Seam ((BridgeExternalContext) facesContext.getExternalContext()).removeSeamAttributes(); }

        //Seam appears to need ViewState set during push
        requestParameterMap.put("javax.faces.ViewState", "ajaxpush");

        The suggested fix is to move:

        requestParameterMap.put("javax.faces.ViewState", "ajaxpush");

        into the code block that checks for the Seam environment as the action is specific to Seam anyway.

        Show
        Deryk Sinotte added a comment - The checkin where this started to fail was 17584: [deryk] icefaces > svn diff -r17583:17584Index: core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java =================================================================== — core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17583) +++ core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java (revision 17584) @@ -220,7 +220,11 @@ //facesContext.renderResponse() skips phase listeners //in JSF 1.2, so do a full execute with no stale input //instead facesContext.getExternalContext().getRequestParameterMap().clear(); + Map requestParameterMap = + facesContext.getExternalContext().getRequestParameterMap(); + requestParameterMap.clear(); + //Seam appears to need ViewState set during push + requestParameterMap.put("javax.faces.ViewState", "ajaxpush"); } else { facesContext.renderResponse(); } This change was added to fix ICE-3532 . The PersistentFacesState.execute method has undergone other changes since the, included some Seam specific modifications. The current code looks like this: Map requestParameterMap = facesContext.getExternalContext().getRequestParameterMap(); requestParameterMap.clear(); if (SeamUtilities.isSeamEnvironment()) { //ICE-2990/JBSEAM-3426 must have empty requestAttributes for push to work with Seam ((BridgeExternalContext) facesContext.getExternalContext()).removeSeamAttributes(); } //Seam appears to need ViewState set during push requestParameterMap.put("javax.faces.ViewState", "ajaxpush"); The suggested fix is to move: requestParameterMap.put("javax.faces.ViewState", "ajaxpush"); into the code block that checks for the Seam environment as the action is specific to Seam anyway.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17738 Tue Oct 07 21:35:38 MDT 2008 deryk.sinotte ICE-3609: implementing a binding for locateAddress so that pushes actually result in updates to the map
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/samples/portlet/location/src/org/icefaces/sample/location/Map.java
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/samples/portlet/location/src/org/icefaces/sample/location/Coordinator.java
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/samples/portlet/location/web/map.jspx
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17739 Tue Oct 07 21:41:27 MDT 2008 deryk.sinotte ICE-3609: implementing a binding for locateAddress so that pushes actually result in updates to the map
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/portlet/location/src/org/icefaces/sample/location/Coordinator.java
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/portlet/location/web/map.jspx
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/portlet/location/src/org/icefaces/sample/location/Map.java
        Hide
        Deryk Sinotte added a comment -

        This appears to be a combination of the the fix noted above for Seam and the way that the GMap component looks for an empty request map to update the location. Rather than risk the stability of the imminent release, we decided to try and fix the Location demo. This involves binding the locateAddress attribute of the component to the Map bean in a way that an update triggers a change of location and then sets the attribute to false.

        Show
        Deryk Sinotte added a comment - This appears to be a combination of the the fix noted above for Seam and the way that the GMap component looks for an empty request map to update the location. Rather than risk the stability of the imminent release, we decided to try and fix the Location demo. This involves binding the locateAddress attribute of the component to the Map bean in a way that an update triggers a change of location and then sets the attribute to false.
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Priority P1
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Deryk Sinotte [ deryk.sinotte ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: