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] 
http://svn.apache.org/repos/asf/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java

--
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Reply via email to