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
Neil Griffin
created issue -
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 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 3.1.0.BETA2 [ 10336 ] |
Deryk Sinotte
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Deryk Sinotte
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |