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
| 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 |      | 
| Files Changed | ||||
            					
			 
                            MODIFY
            				/icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ICEpushResourceHandler.java
            
             | 
| Salesforce Case | [] | |
| Fix Version/s | 3.1.0.BETA2 [ 10336 ] | 
| Status | Open [ 1 ] | In Progress [ 3 ] | 
| Status | In Progress [ 3 ] | Resolved [ 5 ] | 
| Resolution | Fixed [ 1 ] | 
| Status | Resolved [ 5 ] | Closed [ 6 ] | 

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