ICEfaces
  1. ICEfaces
  2. ICE-8203

ICEpushResourceHandler.initialize(...) assumes that there is only one lifecycleId

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.1.0.BETA1
    • Fix Version/s: 3.1.0.BETA2, 3.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Discovered with Liferay Faces Bridge, but it's a generic problem.
    • Assignee Priority:
      P1
    • Workaround Exists:
      Yes
    • Workaround Description:
      For now, I've worked around this issue in Liferay Faces Bridge.

      Description

      I recently patched the following issue in Liferay Faces Bridge:
      http://issues.liferay.com/browse/FACES-1252

      And the solution was to have a separate Lifecycle instance for each of the enum values in javax.portlet.faces.Bridge.PortletPhase:
      http://myfaces.apache.org/portlet-bridge/2.0/api/apidocs/javax/portlet/faces/Bridge.PortletPhase.html

      The problem is that ICEpushResourceHandler.initialize(...) assumes that there is only one lifecycleId, meaning the default one:

      {code}
                  ((LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY)).
                          getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE).addPhaseListener(icePushResourceHandler);{code}

      Here is a patch:
      {code}
                  LifecycleFactory lifecycleFactory = (LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
                  Iterator<String> lifecycleIds = lifecycleFactory.getLifecycleIds();
                  while (lifecycleIds.hasNext()) {
                   String lifecycleId = lifecycleIds.next();
           Lifecycle lifecycle = lifecycleFactory.getLifecycle(lifecycleId);
      lifecycle.addPhaseListener(icePushResourceHandler);
                  }
      {code}

        Activity

        Neil Griffin created issue -
        Hide
        Neil Griffin added a comment -

        Corresponding issue in the Liferay Issue Tracker: http://issues.liferay.com/browse/FACES-1259

        Show
        Neil Griffin added a comment - Corresponding issue in the Liferay Issue Tracker: http://issues.liferay.com/browse/FACES-1259
        Deryk Sinotte made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 3.1 [ 10312 ]
        Assignee Priority P1
        Affects Version/s 3.1.0.BETA1 [ 10335 ]
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #29282 Mon Jun 04 12:56:20 MDT 2012 deryk.sinotte ICE-8203: add ICEpush phase listener to all relevant lifecycles, not just the default (required for the portlet bridge)
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 3.1.0.BETA2 [ 10336 ]
        Deryk Sinotte made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Deryk Sinotte added a comment -

        Fix applied. Resolving.

        Show
        Deryk Sinotte added a comment - Fix applied. Resolving.
        Deryk Sinotte made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: