[jsr-314-open] Method signatures for event handlers

Dan Allen dan.j.allen at gmail.com
Tue Jan 26 17:39:41 EST 2010


On Thu, Jan 21, 2010 at 10:15 PM, Cay Horstmann <cay at horstmann.com> wrote:

> Consulting the specification for f:event (
> http://java.sun.com/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/f/event.html),
> I find that the signature is required to match public void
> listener(javax.faces.event.ComponentSystemEvent event) throws
> javax.faces.event.AbortProcessingException.
>
> That's actually too bad. When I do a preRenderView event with viewParams, I
> don't need the CSE parameter, and I'd rather not couple my managed bean with
> the JSF API. So, it sure would be nice if I had the flexibility of using the
> signature public void listener() instead. Mojarra actually lets me do that!
>

I'm almost certain that we agreed that the event parameter (and exception
signature) were optional. I clearly remember having that discussion. I don't
have it in my archives, but for those that have them, the discussion should
start around Jan 17, 2009.

Thus, I consider this a spec error. The fact that Mojarra implements the
desired behavior is a partial indication that we agreed on it, too.

-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://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100126/a922b02c/attachment.html 


More information about the jsr-314-open-mirror mailing list