[
https://issues.apache.org/jira/browse/PORTLETBRIDGE-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007302#comment-13007302
]
Michael Freedman commented on PORTLETBRIDGE-187:
------------------------------------------------
Yep, in JSF 2.0 the ExternalContext creation has been separated from the
FacesContext creation. Turns out that the generic FacesContext impl is 95%+ (I
think its actually 100%) platform independent -- so the bridge now can grab and
wrap the base one and only override those methods where it extends the
behavior. Pretty much all the platform dependent code is safely inside the
ExternalContext which now has its own factory and hence isn't something tied
explicitly to a given FacesContext.
> Why does the 3.0.0 implementation of PortletFacesContextFactoryImpl differ
> from the one in 2.0?
> -----------------------------------------------------------------------------------------------
>
> Key: PORTLETBRIDGE-187
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-187
> Project: MyFaces Portlet Bridge
> Issue Type: Question
> Components: Impl
> Affects Versions: 3.0.0-alpha
> Reporter: Hampus Wingren
> Assignee: Michael Freedman
>
> This seems like an impossible thing to do if there is no other
> PortletFacesContext implementations available. Is it really correct to try
> and lookup another FacesContext if we are in a portlet environment?
> // if in portlet environment -- do a portlet container neutral test
> // first in case we are packaged in a web app that isn't deployed
> // on a portlet container/as a portlet. Note: can't use the BridgeUtil
> // method as that call requires the facesContext to exist.
> FacesContext fc = getWrapped().getFacesContext(context, request,
> response, lifecycle);
>
> if(ExternalContextUtils.isPortlet(fc.getExternalContext()))
> {
> fc = new FacesContextImpl(fc);
> }
>
> return fc;
> regards,
> Hampus
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira