myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blake Sullivan <>
Subject Re: [MyFaces 2.0] calling popComponentFromEL/pushComponentToEL setParent() ?
Date Tue, 27 Oct 2009 20:38:19 GMT
I don't think that it should do this.  There is no guarantee that any  
of the ancestors will have pushed their context in this case and in  
the absence of such a guarantee, pushing context is dangerous because  
it means that there would be no way to guarantee correct EL context  
setup for listeners that need to look at component attributes.  Note  
also that because JSF doesn't manage the stack of EL contexts, when an  
event is made under context, the only EL-bound attributes that the  
component can safely retrieve are those on itself (directly) and on  
its children (using invokeOnComponent or tree visiting).

-- Blake Sullivan

On Oct 27, 2009, at 12:07 PM, Matthias Wessendorf wrote:

> Hi,
> I read up on the UIComponent.visitTree and it says its implementation
> has to call pushComponentToEL()/popComponentFromEL()
> before/after the processing. Somehow I feel that we may should do this
> on the setParent() call as well.
> Similar to our visitTree() implementation ([1]), at the end/beginning
> of the method. I know the spec (and JavaDoc) says nothing
> about this, but from reading on visitTree()'s javadoc, it sounds  
> reasonable.
> Any thoughts ?
> -Matthias
> [1]
> -- 
> Matthias Wessendorf
> blog:
> sessions:
> twitter:

View raw message