[jsr-314-open] Method signatures for event handlers
Kito Mann
kito.mann at virtua.com
Fri Jan 22 11:52:07 EST 2010
Personally, I don't think there's anything wrong with having a signature
that requires an event listener. Isn't that how most UI toolkits work? What
about Swing or SWT?
I do understand the desire to have some code completely decoupled, though.
If we make the signature optional, though, I'm afraid that'll be even more
confusing for users.
---
Kito D. Mann | twitter: kito99 | Author, JSF in Action
Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter:
jsfcentral
+1 203-404-4848 x3
Sign up for the JSFCentral newsletter: http://oi.vresp.com/?fid=ac048d0e17
On Fri, Jan 22, 2010 at 11:47 AM, Lincoln Baxter, III <
lincolnbaxter at gmail.com> wrote:
> It would be nice if jsf made all these event signatures optional.
>
> I know its a stumbling block for many users.
>
> Perhaps the ability to inject those parameters with an annotation (or
> access via facesContext.getCurrentSystemEvent() ... obviously just a short
> winded concept. But the idea is to somehow provide optional access.)
>
> Lincoln Baxter's Droid
> http://ocpsoft.com
> http://scrumshark.com
> Keep it simple.
>
> On Jan 21, 2010 10:19 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 am asking here and not in the Mojarra forum because I am hoping that the
> f:event spec isn't accurate--it has other issues (
> https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=586,
> https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=639,
> https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=712
> )
>
> Did you discuss this before? Does Mojarra implement what was intended?
>
> Thanks,
>
> Cay
>
> --
>
> Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100122/9dd9256d/attachment.html
More information about the jsr-314-open-mirror
mailing list