This gets my vote for how I'd like to see this handled in 2.1... if we agree, shall we put in an enhancement for 2.1?

+1

Nice thinking, Andy.

Anyone else?

--Lincoln

On Tue, 2009-09-08 at 17:28 -0400, Dan Allen wrote:
On Fri, Sep 4, 2009 at 2:46 PM, Andy Schwartz <andy.schwartz@oracle.com> wrote:
Finally read through this thread.

I'm finally returning to it ;) It's been a good volley.


An alternative that I believe we could implement in the JSF layer without any changes to the EL spec would be to provdie access to an implicit "event" object during event delivery.  The page author would specify:

#{bb.valueChangeListener(event, myparam)}


Where bb.valueChangeListener is bound to:



public void valueChangeListener(ValueChangeEvent ev, String myparam) {}


And the "event" implicit object is set up by JSF to point to the ValueChangeEvent (or more generally, to whatever FacesEvent we happen to be delivering) just prior to invoking any listeners.

Brilliant. This nicely parallels JavaScript's implicit this and event variable and aligns nicely with the implicit variables we have added for composite components (developers will be used to it).

-Dan


--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan
--
Lincoln Baxter, III
Co-Founder of OcpSoft
Author of PrettyFaces URL Rewriting for JSF