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@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@horstmann.com