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? <br><br>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.<br clear="all">
---<br>Kito D. Mann | twitter: kito99 | Author, JSF in Action<br>Virtua, Inc. | <a href="http://www.virtua.com">http://www.virtua.com</a> | JSF/Java EE training and consulting<br><a href="http://www.JSFCentral.com">http://www.JSFCentral.com</a> - JavaServer Faces FAQ, news, and info | twitter: jsfcentral<br>
+1 203-404-4848 x3<br><br>Sign up for the JSFCentral newsletter: <a href="http://oi.vresp.com/?fid=ac048d0e17">http://oi.vresp.com/?fid=ac048d0e17</a><br><br>
<br><br><div class="gmail_quote">On Fri, Jan 22, 2010 at 11:47 AM, Lincoln Baxter, III <span dir="ltr"><<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>It would be nice if jsf made all these event signatures optional. </p>
<p>I know its a stumbling block for many users. </p>
<p>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.)</p>
<p>Lincoln Baxter's Droid<br>
<a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
<a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
Keep it simple.</p><div><div></div><div class="h5">
<p></p><blockquote type="cite">On Jan 21, 2010 10:19 PM, "Cay Horstmann" <<a href="mailto:cay@horstmann.com" target="_blank">cay@horstmann.com</a>> wrote:<br><br>Consulting the specification for f:event (<a href="http://java.sun.com/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/f/event.html" target="_blank">http://java.sun.com/javaee/javaserverfaces/2.0/docs/pdldocs/facelets/f/event.html</a>), I find that the signature is required to match public void listener(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException.<br>
<br>
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!<br>
<br>
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 (<a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=586" target="_blank">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=586</a>, <a href="https://javaserverfaces-spec-public.dev.javanet/issues/show_bug.cgi?id=639" target="_blank">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=639</a>, <a href="https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=712" target="_blank">https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=712</a>)<br>
<br>
Did you discuss this before? Does Mojarra implement what was intended?<br>
<br>
Thanks,<br>
<br>
Cay<br><font color="#888888">
<br>
-- <br>
<br>
Cay S. Horstmann | <a href="http://horstmann.com" target="_blank">http://horstmann.com</a> | mailto:<a href="mailto:cay@horstmann.com" target="_blank">cay@horstmann.com</a><br>
</font></blockquote>
</div></div></blockquote></div><br>