Details
-
Type: Bug
-
Status: Closed
-
Priority: 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}
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
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion