[ 
https://issues.apache.org/jira/browse/PORTLETBRIDGE-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014483#comment-13014483
 ] 

Neil Griffin commented on PORTLETBRIDGE-205:
--------------------------------------------

Note that the RI's BridgeImpl has a RequestAttributeListener that relies on the 
Bridge.PORTLET_LIFECYCLE_PHASE being present as a request attribute. I still 
recommend that Bridge.PORTLET_LIFECYCLE_PHASE be deprecated, and would say that 
the RI should do the request attribute as an internal, implementation dependent 
technique.

> Proposal for 3.0 API: Deprecate constant Bridge.PORTLET_LIFECYCLE_PHASE and 
> refactor BridgeUtil methods accordingly
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: PORTLETBRIDGE-205
>                 URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-205
>             Project: MyFaces Portlet Bridge
>          Issue Type: New Feature
>          Components: General
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Michael Freedman
>
> Proposal is to do this in Bridge.java:
>       /** @deprecated replaced by {@link Bridge#BRIDGE_CONTEXT_ATTRIBUTE} and 
> {@link BridgeContext#getPortletLifecyclePhase()} */
>       @Deprecated     public static final String PORTLET_LIFECYCLE_PHASE = 
> "javax.portlet.faces.phase";
> And to refactor BridgeUtil.getPortletRequestPhase() to something like this:
>       public static Bridge.PortletPhase getPortletRequestPhase() {
>               Bridge.PortletPhase portletRequestPhase = null;
>               FacesContext facesContext = FacesContext.getCurrentInstance();
>               BridgeContext bridgeContext = (BridgeContext) 
> facesContext.getAttributes().get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);
>               if (bridgeContext != null) {
>                       portletRequestPhase = 
> bridgeContext.getPortletRequestPhase();
>               }
>               return portletRequestPhase;
>       }
> And refactor BridgeUtil.isPortletRequest() to something like this:
>       public static boolean isPortletRequest() {
>               FacesContext facesContext = FacesContext.getCurrentInstance();
>               BridgeContext bridgeContext = (BridgeContext) 
> facesContext.getAttributes().get(Bridge.BRIDGE_CONTEXT_ATTRIBUTE);
>               return (bridgeContext != null);
>       }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to