ICEfaces
  1. ICEfaces
  2. ICE-7528

Panel Listeners that handle the "toggle" and "close" events are not being fired in MyFaces.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0.RC1
    • Fix Version/s: 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      *
    • Assignee Priority:
      P1

      Description

      From Derek:

      When running the Panel Listeners example in the ACE Showcase with
      MyFaces, the methods that handle the "toggle" and "close" events are not
      being fired. The relevant markup:

      <ace:panel header="ICEfaces Header With Listeners"
                              closable="true"
                              toggleable="true">
      <ace:ajax event="close" listener="#{panelListener.close}" render="status" />
      <ace:ajax event="toggle" listener="#{panelListener.toggle}"
      render="status"/>

      I added some logging and the problem is that the AjaxBehavior that is
      used to broadcast the events is not the AjaxBehavior that was initially
      registered. I assume that the extra AjaxBehaviors that are created are
      the cost of doing all the Facelets includes and such.

      Mojarra

      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@7629a4cb
      AjaxBehavior.setListener:
      /resources/examples/ace/panel/panelListener.xhtml @44,93
      listener="#{panelListener.close}":
      org.apache.el.MethodExpressionImpl@c35a2e13 for
      org.icefaces.ace.component.ajax.AjaxBehavior@7629a4cb
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@28024808
      AjaxBehavior.setListener:
      /resources/examples/ace/panel/panelListener.xhtml @45,94
      listener="#{panelListener.toggle}":
      org.apache.el.MethodExpressionImpl@2fddf4db for
      org.icefaces.ace.component.ajax.AjaxBehavior@28024808
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@2dc719bd
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@e478e18
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@7bc1d0fa
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@717f0c8f
      AjaxBehavior.broadcast: calling for
      org.icefaces.ace.component.ajax.AjaxBehavior@28024808
      PanelListener.toggle: Toggle Event fired @ 10:56:17


      MyFaces

      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@37de41ce
      AjaxBehavior.setListener:
      /resources/examples/ace/panel/panelListener.xhtml at line 44 and column
      93: org.apache.el.MethodExpressionImpl@c35a2e13 for
      org.icefaces.ace.component.ajax.AjaxBehavior@37de41ce
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@60b25809
      AjaxBehavior.setListener:
      /resources/examples/ace/panel/panelListener.xhtml at line 45 and column
      94: org.apache.el.MethodExpressionImpl@2fddf4db for
      org.icefaces.ace.component.ajax.AjaxBehavior@60b25809
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@5cb1e877
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@24150c2c
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@61d22f35
      AjaxBehavior: org.icefaces.ace.component.ajax.AjaxBehavior@2e1972bf
      AjaxBehavior.broadcast: calling for
      org.icefaces.ace.component.ajax.AjaxBehavior@24150c2c
      AjaxBehavior.broadcast: no listener for
      org.icefaces.ace.component.ajax.AjaxBehavior@24150c2c

        Issue Links

          Activity

          Hide
          yip.ng added a comment -

          From Mark:

          MyFaces does more state saving/restorating/tree-nuking than Mojarra, and AjaxBehaviour extends/implements StateHolder, but none of its fields participate in state saving, so they're likely getting lost.

          Show
          yip.ng added a comment - From Mark: MyFaces does more state saving/restorating/tree-nuking than Mojarra, and AjaxBehaviour extends/implements StateHolder, but none of its fields participate in state saving, so they're likely getting lost.
          Hide
          yip.ng added a comment -

          listener restored OK at RESTORE_VIEW, but becomes null at APPLY_REQUEST_VALUES, so state saving is not the cause?

          AjaxBehavior.setListener
          FacesContext.getCurrentInstance().getCurrentPhaseId() = RENDER_RESPONSE(6)
          this = org.icefaces.ace.component.ajax.AjaxBehavior@100c405f
          listener = /resources/examples/ace/panel/panelListener.xhtml at line 42 and column 94: org.apache.el.MethodExpressionImpl@2fddf4db
          AjaxBehavior.setListener
          FacesContext.getCurrentInstance().getCurrentPhaseId() = RESTORE_VIEW(1)
          this = org.icefaces.ace.component.ajax.AjaxBehavior@2fa28842
          listener = /resources/examples/ace/panel/panelListener.xhtml at line 42 and column 94: org.apache.el.MethodExpressionImpl@2fddf4db
          AjaxBehavior.broadcast
          FacesContext.getCurrentInstance().getCurrentPhaseId() = APPLY_REQUEST_VALUES(2)
          this = org.icefaces.ace.component.ajax.AjaxBehavior@296df388
          listener = null

          Show
          yip.ng added a comment - listener restored OK at RESTORE_VIEW, but becomes null at APPLY_REQUEST_VALUES, so state saving is not the cause? AjaxBehavior.setListener FacesContext.getCurrentInstance().getCurrentPhaseId() = RENDER_RESPONSE(6) this = org.icefaces.ace.component.ajax.AjaxBehavior@100c405f listener = /resources/examples/ace/panel/panelListener.xhtml at line 42 and column 94: org.apache.el.MethodExpressionImpl@2fddf4db AjaxBehavior.setListener FacesContext.getCurrentInstance().getCurrentPhaseId() = RESTORE_VIEW(1) this = org.icefaces.ace.component.ajax.AjaxBehavior@2fa28842 listener = /resources/examples/ace/panel/panelListener.xhtml at line 42 and column 94: org.apache.el.MethodExpressionImpl@2fddf4db AjaxBehavior.broadcast FacesContext.getCurrentInstance().getCurrentPhaseId() = APPLY_REQUEST_VALUES(2) this = org.icefaces.ace.component.ajax.AjaxBehavior@296df388 listener = null
          Hide
          yip.ng added a comment - - edited

          Also, if I replace the initial page with just the panel demo (i.e. no <ui:include>, <ui:define>, etc.), it works.

          Show
          yip.ng added a comment - - edited Also, if I replace the initial page with just the panel demo (i.e. no <ui:include>, <ui:define>, etc.), it works.
          Hide
          yip.ng added a comment -

          Not doing anything further right now.
          (I have also tried overriding saveState() and restorState () in Panel to save listener but couldn't get it to work.)
          (Also read the MyFaces source code and it is already saving the listeners similarly to Mojarra.)

          Show
          yip.ng added a comment - Not doing anything further right now. (I have also tried overriding saveState() and restorState () in Panel to save listener but couldn't get it to work.) (Also read the MyFaces source code and it is already saving the listeners similarly to Mojarra.)
          Hide
          Deryk Sinotte added a comment -

          Marking this as a duplicate rather than a related issue.

          Show
          Deryk Sinotte added a comment - Marking this as a duplicate rather than a related issue.
          Hide
          Deryk Sinotte added a comment -

          Resolving as duplicate. This is the same problem as outlined in ICE-7253

          Show
          Deryk Sinotte added a comment - Resolving as duplicate. This is the same problem as outlined in ICE-7253

            People

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

              Dates

              • Created:
                Updated:
                Resolved: