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

Leonardo Uribe commented on MYFACES-3039:
-----------------------------------------

The objective of defaultExternalContext is work as a fallback when jsf 1.2 or 
1.1 libraries with custom ExternalContext wrapper are used. The idea is if the 
external wrapper does not implement a method introduced on jsf 2.0, it 
automatically fallback to the defaultExternalContext implementation.

It is known both myfaces and mojarra has different strategies to handle this 
case, and there is nothing on the spec related to this behavior. 

In jsf 2.0 it was introduced ExternalContextWrapper, so all wrappers must 
extends from this class.

At the end, in my opinion, it should not be a concern in portlet case. It is a 
known problem in portlets (it happens with jsf 1.2 and some conditions, that's 
the reason why orchestra has a jsf 1.2 package). I tried once to comunicate 
this problem to you personally (in JSFDays) but in that time it was not clear 
why this detail was important (as now), so in that time I was not taken too 
seriously and really I don't see how this detail could be on the spec in other 
way. Note the wrapper solves the problem for future jsf versions.


> MyFaces broken in Portlet environment:  Fails to support extendable 
> FacesContextFactory/FacesContext/ExternalContext
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3039
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3039
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>            Reporter: Michael Freedman
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.5-SNAPSHOT
>
>
> JSF 2.0 improved the definition/handling of the instantiation of the 
> FacesContext allowing non-servlet environments to wrap the base/core impl.  
> This was done because most of the FacesContext apis are inherently runtime 
> environment neutral -- allowing the portlet bridge to not have to 
> duplicate/reimplement and maybe get wrong base core function.  Unfortunately 
> MyFaces doesn't conform to this change and hence the Portlet Bridge can't run 
> in the MyFaces environment.  
> Basically the bridge expects to be able to delegate from its 
> FacesContextFactoryImpl.getFacesContext and then wrap the returned 
> FacesContext with its own.  This requires the underlying core impl to be 
> runtime (servlet/portlet) neutral during the creation process.  The bridge 
> will wrap the FacesContext and supply its own ExternalContext such that  any 
> servlet dependent impl in the core FacesContext/ExternalContext will be 
> hidden by overrides.
> FYI ... until this is addressed I can't begin any testing of the bridge on 
> MyFaces.

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

        

Reply via email to