ICEfaces
  1. ICEfaces
  2. ICE-7399

toggling client side ace:panel generating ice.submit.type ice.dispose.window request in IE7

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7.0.12

      Description

      The application is using an ace:panel in the following manner, it should just toggle client side without generating a request to the server:

            <ace:panel id="filtersPanel"
                   toggleable="true"
                  header="Filters">

      However, toggling the component in IE7 is resulting in execution of the JSF lifecycle and the execution of this code in one of the PhaseListeners:

                      if ("ice.dispose.window".equals(fc.getExternalContext()
                              .getRequestParameterMap().get("ice.submit.type"))) {

      The undesirable effect is that their current window scope bean is being destroyed when the print preview window is launched and the user session is destroyed.

      I have not been able to reproduce this in the poc.

        Activity

        Hide
        Brad Kroeger added a comment - - edited

        Actions to reproduce this issue:

        IE7 only:

        1 - go to page with ace:panel
        2 - toggle panel
        3 - open print preview window
        4 - print preview window displays error message, session expired (session expired is a result of the current Window scope bean being destroyed)

        If you leave out step #2 (do not toggle the ace:panel), the print preview process works normally.

        Show
        Brad Kroeger added a comment - - edited Actions to reproduce this issue: IE7 only: 1 - go to page with ace:panel 2 - toggle panel 3 - open print preview window 4 - print preview window displays error message, session expired (session expired is a result of the current Window scope bean being destroyed) If you leave out step #2 (do not toggle the ace:panel), the print preview process works normally.
        Hide
        Brad Kroeger added a comment -

        Add list_page_template.xhtml which has the form with the ace:panel.

        Show
        Brad Kroeger added a comment - Add list_page_template.xhtml which has the form with the ace:panel.
        Hide
        Brad Kroeger added a comment -

        In Firefox, which does not have a problem:

        1 - collapse ace:panel

        In console: [window] persisted focus for element ""
        NO CONTACT WITH SERVER, NO PHASELISTENER EXECUTED

        2 - press print preview

        In console:
        [window] persisted focus for element ""
        bridge...4442961 (line 1214)
        [window] full submit to http://localhost:8080/1Line/xhtml/home.jsf javax.faces.execute: @all javax.faces.render: @all javax.faces.source: mainMenuForm view ID: vxn968h3 event type: unknown
        bridge...4442961 (line 1214)
        [window] noopShowPanel is called
        bridge...4442961 (line 1214)
        POST http://localhost:8080/1Line/xhtml/home.jsf

        200 OK
        25.19s
        [window] noopHidePanel is called
        bridge...4442961 (line 1214)
        [window] applied updates >> update["mainMenuForm:measurementURL"]: <input id="mainMenuForm:measurementURL" .... update["serverTimeMilliSec"]: <input id="serverTimeMilliSec" type="hid.... update["javax.faces.ViewState"]: -456601530719150790:-4304138902821834587.... eval extension
        bridge...4442961 (line 1214)
        [window] applied updates >> update["mainMenuForm:measurementURL"]: <input id="mainMenuForm:measurementURL" .... update["serverTimeMilliSec"]: <input id="serverTimeMilliSec" type="hid.... update["javax.faces.ViewState"]: -456601530719150790:-4304138902821834587.... eval extension

        POST TO SERVER RESULTS IN APPROPRIATE CODE EXECUTED. AT NO POINT DOES THE PHASELISTENER "ice.dispose.window".equals(fc.getExternalContext() .getRequestParameterMap().get("ice.submit.type") RESOLVE TO TRUE

        Show
        Brad Kroeger added a comment - In Firefox, which does not have a problem: 1 - collapse ace:panel In console: [window] persisted focus for element "" NO CONTACT WITH SERVER, NO PHASELISTENER EXECUTED 2 - press print preview In console: [window] persisted focus for element "" bridge...4442961 (line 1214) [window] full submit to http://localhost:8080/1Line/xhtml/home.jsf javax.faces.execute: @all javax.faces.render: @all javax.faces.source: mainMenuForm view ID: vxn968h3 event type: unknown bridge...4442961 (line 1214) [window] noopShowPanel is called bridge...4442961 (line 1214) POST http://localhost:8080/1Line/xhtml/home.jsf 200 OK 25.19s [window] noopHidePanel is called bridge...4442961 (line 1214) [window] applied updates >> update ["mainMenuForm:measurementURL"] : <input id="mainMenuForm:measurementURL" .... update ["serverTimeMilliSec"] : <input id="serverTimeMilliSec" type="hid.... update ["javax.faces.ViewState"] : -456601530719150790:-4304138902821834587.... eval extension bridge...4442961 (line 1214) [window] applied updates >> update ["mainMenuForm:measurementURL"] : <input id="mainMenuForm:measurementURL" .... update ["serverTimeMilliSec"] : <input id="serverTimeMilliSec" type="hid.... update ["javax.faces.ViewState"] : -456601530719150790:-4304138902821834587.... eval extension POST TO SERVER RESULTS IN APPROPRIATE CODE EXECUTED. AT NO POINT DOES THE PHASELISTENER "ice.dispose.window".equals(fc.getExternalContext() .getRequestParameterMap().get("ice.submit.type") RESOLVE TO TRUE
        Hide
        Brad Kroeger added a comment -

        Here is the Firefox post:

        mainMenuForm=mainMenuForm&ice.window=8cgufme07a&ice.view=vxn968h3&mainMenuForm%3AmeasurementURL=&mainMenuForm%3AhfSelectedBUID=%20&icefacesCssUpdates=&javax.faces.ViewState=-456601530719150790%3A-4304138902821834587&javax.faces.source=mainMenuForm&javax.faces.partial.execute=%40all&javax.faces.partial.render=%40all&ice.window=8cgufme07a&ice.view=vxn968h3&ice.focus=&ice.event.target=mainMenuForm&ice.event.captured=mainMenuForm&ice.event.type=onunknown&mainMenuForm%3Aprint=mainMenuForm%3Aprint&ice.customUpdate=mainMenuForm%3Aprint&javax.faces.partial.ajax=true

        Response:

        <?xml version='1.0' encoding='UTF-8'?>
        <partial-response><changes><update id="mainMenuForm:measurementURL"><Unable to render embedded object: File (measurementURL" name="mainMenuForm:measurementURL" type="hidden" />]]></update><update id="serverTimeMilliSec"><) not found.[CDATA[<input id="serverTimeMilliSec" type="hidden" value="1320075131472" />]]></update><update id="javax.faces.ViewState"><Unable to render embedded object: File (-4304138902821834587]]></update><eval><) not found.[CDATA[printJSF();]]></eval><extension aceCallbackParam="validationFailed">

        {"validationFailed":false}

        </extension></changes></partial-response>

        Show
        Brad Kroeger added a comment - Here is the Firefox post: mainMenuForm=mainMenuForm&ice.window=8cgufme07a&ice.view=vxn968h3&mainMenuForm%3AmeasurementURL=&mainMenuForm%3AhfSelectedBUID=%20&icefacesCssUpdates=&javax.faces.ViewState=-456601530719150790%3A-4304138902821834587&javax.faces.source=mainMenuForm&javax.faces.partial.execute=%40all&javax.faces.partial.render=%40all&ice.window=8cgufme07a&ice.view=vxn968h3&ice.focus=&ice.event.target=mainMenuForm&ice.event.captured=mainMenuForm&ice.event.type=onunknown&mainMenuForm%3Aprint=mainMenuForm%3Aprint&ice.customUpdate=mainMenuForm%3Aprint&javax.faces.partial.ajax=true Response: <?xml version='1.0' encoding='UTF-8'?> <partial-response><changes><update id="mainMenuForm:measurementURL">< Unable to render embedded object: File (measurementURL" name="mainMenuForm:measurementURL" type="hidden" />]]></update><update id="serverTimeMilliSec"><) not found. [CDATA [<input id="serverTimeMilliSec" type="hidden" value="1320075131472" />] ]></update><update id="javax.faces.ViewState">< Unable to render embedded object: File (-4304138902821834587]]></update><eval><) not found. [CDATA [printJSF();] ]></eval><extension aceCallbackParam="validationFailed"> {"validationFailed":false} </extension></changes></partial-response>
        Hide
        Brad Kroeger added a comment -

        In IE7, I don't have the use of a tool like firebug, but here is the console output and phaseListener data:

        1 - collapse ace:panel

        UNEXPECTED EXECUTION OF THE JSF LIFECYCLE - PHASELISTENER EXECUTED "ice.dispose.window".equals(fc.getExternalContext() .getRequestParameterMap().get("ice.submit.type") RESOLVES TO TRUE WHICH NEVER HAPPENS IN FIREFOX

        2 - Press Print Preview

        POST TO SERVER RESULTS IN @PreDestroy METHOD CALLED ON WINDOW SCOPE BEAN WHICH RESULTS IN THE APPLICATION INVALIDATING THE SESSION

        The print preview window has the following:

        An Error Occurred - Session has expired

        org.icefaces.application.SessionExpiredException: Session has expired
        at org.icefaces.impl.application.SessionExpiredListener.sessionDestroyed(SessionExpiredListener.java:62)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:805)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:740)
        at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
        at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:186)
        at com.wgp.servdev.login.service.impl.LoginServiceImpl.logoff(LoginServiceImpl.java:484)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.wgp.servdev.common.service.util.WgpManagedBeanProxy.invoke(WgpManagedBeanProxy.java:119)
        at $Proxy24.logoff(Unknown Source)
        at com.wgp.servdev.common.backing.WindowCloseMonitorBean.preDestroy(WindowCloseMonitorBean.java:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.faces.vendor.WebContainerInjectionProvider.invokeAnnotatedMethod(WebContainerInjectionProvider.java:117)
        at com.sun.faces.vendor.WebContainerInjectionProvider.invokePreDestroy(WebContainerInjectionProvider.java:87)
        at com.sun.faces.mgbean.BeanBuilder.destroy(BeanBuilder.java:116)
        at com.sun.faces.mgbean.BeanManager.processEvent(BeanManager.java:125)
        at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
        at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2139)
        at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2115)
        at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:293)
        at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:244)
        at org.icefaces.impl.application.WindowScopeManager$ScopeMap.discardIfExpired(WindowScopeManager.java:310)
        at org.icefaces.impl.application.WindowScopeManager$ScopeMap.access$500(WindowScopeManager.java:275)
        at org.icefaces.impl.application.WindowScopeManager.determineWindowID(WindowScopeManager.java:109)
        at org.icefaces.impl.application.WindowScopeManager$DetermineOrDisposeScope.beforePhase(WindowScopeManager.java:510)
        at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
        at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at com.wgp.servdev.common.servlet.filter.JSFResourceCacheSettingFilter.doFilter(JSFResourceCacheSettingFilter.java:38)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
        at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:306)
        at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:323)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1719)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

        Show
        Brad Kroeger added a comment - In IE7, I don't have the use of a tool like firebug, but here is the console output and phaseListener data: 1 - collapse ace:panel UNEXPECTED EXECUTION OF THE JSF LIFECYCLE - PHASELISTENER EXECUTED "ice.dispose.window".equals(fc.getExternalContext() .getRequestParameterMap().get("ice.submit.type") RESOLVES TO TRUE WHICH NEVER HAPPENS IN FIREFOX 2 - Press Print Preview POST TO SERVER RESULTS IN @PreDestroy METHOD CALLED ON WINDOW SCOPE BEAN WHICH RESULTS IN THE APPLICATION INVALIDATING THE SESSION The print preview window has the following: An Error Occurred - Session has expired org.icefaces.application.SessionExpiredException: Session has expired at org.icefaces.impl.application.SessionExpiredListener.sessionDestroyed(SessionExpiredListener.java:62) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:805) at org.apache.catalina.session.StandardSession.expire(StandardSession.java:740) at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253) at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:186) at com.wgp.servdev.login.service.impl.LoginServiceImpl.logoff(LoginServiceImpl.java:484) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.wgp.servdev.common.service.util.WgpManagedBeanProxy.invoke(WgpManagedBeanProxy.java:119) at $Proxy24.logoff(Unknown Source) at com.wgp.servdev.common.backing.WindowCloseMonitorBean.preDestroy(WindowCloseMonitorBean.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.faces.vendor.WebContainerInjectionProvider.invokeAnnotatedMethod(WebContainerInjectionProvider.java:117) at com.sun.faces.vendor.WebContainerInjectionProvider.invokePreDestroy(WebContainerInjectionProvider.java:87) at com.sun.faces.mgbean.BeanBuilder.destroy(BeanBuilder.java:116) at com.sun.faces.mgbean.BeanManager.processEvent(BeanManager.java:125) at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106) at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2139) at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2115) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:293) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:244) at org.icefaces.impl.application.WindowScopeManager$ScopeMap.discardIfExpired(WindowScopeManager.java:310) at org.icefaces.impl.application.WindowScopeManager$ScopeMap.access$500(WindowScopeManager.java:275) at org.icefaces.impl.application.WindowScopeManager.determineWindowID(WindowScopeManager.java:109) at org.icefaces.impl.application.WindowScopeManager$DetermineOrDisposeScope.beforePhase(WindowScopeManager.java:510) at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.wgp.servdev.common.servlet.filter.JSFResourceCacheSettingFilter.doFilter(JSFResourceCacheSettingFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:306) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:323) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1719) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
        Hide
        Brad Kroeger added a comment - - edited

        I was able to reproduce this issue in IE9, this is in the console when the ace:panel is collapsed:

        LOG: [window] dispose window and associated views

        Request:

        ice.submit.type=ice.dispose.window&ice.window=53gufwywnl&javax.faces.ViewState=-7534589080201350371%3A4519243372020019215

        Response:

        No data to view.

        The source in the page for ace:panel collapsible link:

        <a class="ui-panel-titlebar-icon ui-corner-all ui-state-default" href="javascript:void(0)">

        It appears the problem is how ICEfaces deals with IE's handling of javscript:void(0).

        Show
        Brad Kroeger added a comment - - edited I was able to reproduce this issue in IE9, this is in the console when the ace:panel is collapsed: LOG: [window] dispose window and associated views Request: ice.submit.type=ice.dispose.window&ice.window=53gufwywnl&javax.faces.ViewState=-7534589080201350371%3A4519243372020019215 Response: No data to view. The source in the page for ace:panel collapsible link: <a class="ui-panel-titlebar-icon ui-corner-all ui-state-default" href="javascript:void(0)"> It appears the problem is how ICEfaces deals with IE's handling of javscript:void(0).
        Hide
        yip.ng added a comment - - edited

        Checked in fix as in ICE-7145. Williamspoc app. currently broken after check-out. Some NPE.

        Revision: 26168


        Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java

        Revision: 26175


        Modified : /icefaces-ee/tags/icefaces-2.1.0.BETA/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java

        Revision: 26174


        Modified : /icefaces-ee/tags/icefaces-2.1.0.BETA2/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java

        Show
        yip.ng added a comment - - edited Checked in fix as in ICE-7145. Williamspoc app. currently broken after check-out. Some NPE. Revision: 26168 Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java Revision: 26175 Modified : /icefaces-ee/tags/icefaces-2.1.0.BETA/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java Revision: 26174 Modified : /icefaces-ee/tags/icefaces-2.1.0.BETA2/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java

          People

          • Assignee:
            yip.ng
            Reporter:
            Brad Kroeger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: