ICEfaces
  1. ICEfaces
  2. ICE-3773

standardRequestScope propagating extra attributes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.8DR#1
    • Fix Version/s: 1.8DR#2, 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces

      Description


      When standardRequestScope is enabled, some values appear to be retained from previous requests.

        Issue Links

          Activity

          Ted Goddard created issue -
          Ted Goddard made changes -
          Field Original Value New Value
          Fix Version/s 1.8DR#2 [ 10142 ]
          Assignee Mircea Toma [ mircea.toma ]
          Ken Fyten made changes -
          Link This issue blocks ICE-3708 [ ICE-3708 ]
          Hide
          Mircea Toma added a comment -

          I believe the fixes for ICE-3617 have also fixed this issue.
          I cannot reproduce the issue with the current Trunk.

          Show
          Mircea Toma added a comment - I believe the fixes for ICE-3617 have also fixed this issue. I cannot reproduce the issue with the current Trunk.
          Hide
          Ted Goddard added a comment -

          To test this, I added the following code to the PartialSubmitPhaseListener:

          requestMap.put("T1" + String.valueOf(System.currentTimeMillis()), "T2" + String.valueOf(System.currentTimeMillis()));
          System.out.println("THE REQUEST MAP " + requestMap);

          with the current trunk I still see these values accumulating after a series of partialSubmit operations.

          (I do see the requestMap cleared when a full page refresh is invoked, however.)

          Show
          Ted Goddard added a comment - To test this, I added the following code to the PartialSubmitPhaseListener: requestMap.put("T1" + String.valueOf(System.currentTimeMillis()), "T2" + String.valueOf(System.currentTimeMillis())); System.out.println("THE REQUEST MAP " + requestMap); with the current trunk I still see these values accumulating after a series of partialSubmit operations. (I do see the requestMap cleared when a full page refresh is invoked, however.)
          Hide
          Mircea Toma added a comment -

          PhaseListener.beforePhase and PhaseListener.afterPhase methods are invoked every time a JSF phase is executed. That means there will be 6 "T1...." keys present at the end of a complete JSF lifecycle (keys correspond to the JSF phases), but each time the method is invoked there will be a different set of keys which gives you the impression they accumulate.

          Show
          Mircea Toma added a comment - PhaseListener.beforePhase and PhaseListener.afterPhase methods are invoked every time a JSF phase is executed. That means there will be 6 "T1...." keys present at the end of a complete JSF lifecycle (keys correspond to the JSF phases), but each time the method is invoked there will be a different set of keys which gives you the impression they accumulate.
          Hide
          Ted Goddard added a comment -

          To be more clear: I put the requestMap test code inside:

          if (TRUE.equals(parameterMap.get(ICE_PARTIAL)) )

          { ... }

          so it runs only once per RESTORE_VIEW phase.

          Ted.

          Show
          Ted Goddard added a comment - To be more clear: I put the requestMap test code inside: if (TRUE.equals(parameterMap.get(ICE_PARTIAL)) ) { ... } so it runs only once per RESTORE_VIEW phase. Ted.
          Hide
          Mircea Toma added a comment -

          I followed your instructions and I always see just one "T1...." entry at the time.

          Show
          Mircea Toma added a comment - I followed your instructions and I always see just one "T1...." entry at the time.
          Hide
          Ted Goddard added a comment -

          After updating to ICEfaces trunk and trying the modified PhaseListener

          +++ src/com/icesoft/faces/application/PartialSubmitPhaseListener.java (working copy)
          @@ -71,6 +71,8 @@
          setRequiredFalseInFormContaining(component, componentID);
          Map requestMap = externalContext.getRequestMap();
          requestMap.put(ALTERED_KEY, alteredRequiredComponents);
          +requestMap.put("T1" + String.valueOf(System.currentTimeMillis()), "T2" + String.valueOf(System.currentTimeMillis()));
          +System.out.println("THE REQUEST MAP " + requestMap);
          }
          }
          if (PhaseId.RENDER_RESPONSE == phaseEvent.getPhaseId()) {

          using component-showcase in the Text Entry clicking repeatedly between two text fields, the requestMap appears to be growing:

          THE REQUEST MAP {T11226948246231=T21226948246231, com.icesoft.doctype.public=-//W3C//DTD XHTML 1.0 Transitional//EN, com.icesoft.doctype.prettyprinting=null, T11226948237065=T21226948237065, msgs=com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@4c6b72, T11226948235960=T21226948235960, node=node.dataTableParent.label, com.icesoft.doctype.output=null, T11226948243725=T21226948243725, T11226948240816=T21226948240816, com.sun.faces.util.RequestStateManager=

          {com.sun.faces.renderKitImplForRequest=com.sun.faces.renderkit.RenderKitFactoryImpl@22351e}

          , org.icefaces.altered-components={}, T11226948244865=T21226948244865, icesoft_javascript_request_key_7698193=, textFields=org.icefaces.application.showcase.view.bean.examples.component.textEntry.TextFieldsBean@cd4acb, T11226948238136=T21226948238136, com.icesoft.doctype.system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd, com.icesoft.faces.FormRequiredHidden=null, facelets.Encoding=UTF-8, T11226948217621=T21226948217621, com.icesoft.doctype.root=HTML, sortHeaderModel=org.icefaces.application.showcase.view.bean.examples.component.commandSortHeader.SortHeaderModel@e962a8, T11226948239282=T21226948239282}

          Show
          Ted Goddard added a comment - After updating to ICEfaces trunk and trying the modified PhaseListener +++ src/com/icesoft/faces/application/PartialSubmitPhaseListener.java (working copy) @@ -71,6 +71,8 @@ setRequiredFalseInFormContaining(component, componentID); Map requestMap = externalContext.getRequestMap(); requestMap.put(ALTERED_KEY, alteredRequiredComponents); +requestMap.put("T1" + String.valueOf(System.currentTimeMillis()), "T2" + String.valueOf(System.currentTimeMillis())); +System.out.println("THE REQUEST MAP " + requestMap); } } if (PhaseId.RENDER_RESPONSE == phaseEvent.getPhaseId()) { using component-showcase in the Text Entry clicking repeatedly between two text fields, the requestMap appears to be growing: THE REQUEST MAP {T11226948246231=T21226948246231, com.icesoft.doctype.public=-//W3C//DTD XHTML 1.0 Transitional//EN, com.icesoft.doctype.prettyprinting=null, T11226948237065=T21226948237065, msgs=com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@4c6b72, T11226948235960=T21226948235960, node=node.dataTableParent.label, com.icesoft.doctype.output=null, T11226948243725=T21226948243725, T11226948240816=T21226948240816, com.sun.faces.util.RequestStateManager= {com.sun.faces.renderKitImplForRequest=com.sun.faces.renderkit.RenderKitFactoryImpl@22351e} , org.icefaces.altered-components={}, T11226948244865=T21226948244865, icesoft_javascript_request_key_7698193=, textFields=org.icefaces.application.showcase.view.bean.examples.component.textEntry.TextFieldsBean@cd4acb, T11226948238136=T21226948238136, com.icesoft.doctype.system= http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd , com.icesoft.faces.FormRequiredHidden=null, facelets.Encoding=UTF-8, T11226948217621=T21226948217621, com.icesoft.doctype.root=HTML, sortHeaderModel=org.icefaces.application.showcase.view.bean.examples.component.commandSortHeader.SortHeaderModel@e962a8, T11226948239282=T21226948239282}
          Hide
          Mircea Toma added a comment -

          Ted,

          I really can't reproduce the issue. If component-showcase is configured with standardRequestCope=true then the NavigationBean needs to be session scoped to actually test if attributes are accumulating.

          Show
          Mircea Toma added a comment - Ted, I really can't reproduce the issue. If component-showcase is configured with standardRequestCope=true then the NavigationBean needs to be session scoped to actually test if attributes are accumulating.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Cannot Reproduce [ 5 ]
          Hide
          Ted Goddard added a comment -

          I've confirmed this is fixed in component-showcase, so I will test again with the Spring Web Flow example.

          Show
          Ted Goddard added a comment - I've confirmed this is fixed in component-showcase, so I will test again with the Spring Web Flow example.
          Hide
          Ted Goddard added a comment -

          This problem seems specific to Spring Web Flow integration. The new SWF-specific JIRA is ICE-3799.

          Show
          Ted Goddard added a comment - This problem seems specific to Spring Web Flow integration. The new SWF-specific JIRA is ICE-3799 .
          Ken Fyten made changes -
          Fix Version/s 1.8 [ 10161 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Assignee Mircea Toma [ mircea.toma ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: