> I don't see how or why it assumes that. Why could I not have 
multiple<br>
&gt; validators which all specified that they belonged to the same form?<br><br>I think I was having a bit of a dyslexic day all around...<br><br><div class="gmail_quote">On Mon, Jun 14, 2010 at 11:57 PM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hehe :)<br><br>I&#39;m in favor of the @FormValidator(...) annotation. Sold, for an annotation.<br>
<font color="#888888"><br>--Lincoln</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, Jun 14, 2010 at 8:19 PM, Gavin King <span dir="ltr">&lt;<a href="mailto:gavin.king@gmail.com" target="_blank">gavin.king@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">P.S. shouldn&#39;t FormValidator be called ActionForm?<br>
<br>
*ducks*<br>
<div><div></div><div><br>
On Tue, Jun 15, 2010 at 2:17 AM, Gavin King &lt;<a href="mailto:gavin.king@gmail.com" target="_blank">gavin.king@gmail.com</a>&gt; wrote:<br>
&gt; On Mon, Jun 14, 2010 at 5:23 PM, Lincoln Baxter, III<br>
&gt; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; Unfortunately, this assumes the existance of only 1 FormValidator per form,<br>
&gt;&gt; which is likely not the case in many scenarios;<br>
&gt;<br>
&gt; I don&#39;t see how or why it assumes that. Why could I not have multiple<br>
&gt; validators which all specified that they belonged to the same form?<br>
&gt;<br>
&gt; Or are you trying to say that it encourages one form per form<br>
&gt; validator? (That&#39;s not what you wrote.)<br>
&gt;<br>
&gt;&gt; It encourages breaking<br>
&gt;&gt; separation of concerns (where now you have only 1 validator handling<br>
&gt;&gt; multiple scenarios per form -- if you do have multiple scenarios-- and many<br>
&gt;&gt; different combinations of fields that may or may not be related.<br>
&gt;<br>
&gt; So the intention here is that you would create reusable form<br>
&gt; validators that would attach to common, repeated combinations of input<br>
&gt; fields that appear in many forms? This seems deeply, deeply doubtful<br>
&gt; to me. It seems that in this case you should be composing a reusable<br>
&gt; JSF component out of the smaller fields and attaching a single<br>
&gt; validator to it. Cross-field validation is usually something that is<br>
&gt; very specific to a single form in the application, in my experience.<br>
&gt;<br>
&gt;&gt; This also<br>
&gt;&gt; breaks re-use of FormValidators by hard-binding form field IDs to validator<br>
&gt;&gt; field names.<br>
&gt;<br>
&gt; Again, I don&#39;t see that cross-field validation is something that is<br>
&gt; often reusable. On the contrary, it&#39;s highly uncommon to see repeated<br>
&gt; combinations of fields in several different forms, and when you do see<br>
&gt; it, it&#39;s usually a case where you should factor out some higher-level<br>
&gt; control (like a datetime control or whatever).<br>
&gt;<br>
&gt; I&#39;m not saying that it&#39;s unimaginable, just that it&#39;s not at all the<br>
&gt; common case.<br>
&gt;<br>
&gt;&gt; There is also the danger of bleeding across views, where a formValidator is<br>
&gt;&gt; created that &quot;accidentally&quot; becomes attached to another form with the same<br>
&gt;&gt; name on a different page, or when you want to use the same form-name, but<br>
&gt;&gt; can&#39;t because you will automatically trigger form validation (that would<br>
&gt;&gt; likely fail (forcing you to disable it in some way, or choose a different<br>
&gt;&gt; name.)<br>
&gt;<br>
&gt; That all sounds totally trivial to solve via a combination of view id<br>
&gt; and form id.<br>
&gt;<br>
&gt; @FormValidator(view=&quot;login.jsf&quot;, form=&quot;loginForm&quot;)<br>
&gt;<br>
&gt;&gt; This could also have the undesired effect of attaching validators that are<br>
&gt;&gt; not intended to be form validators (perhaps validators that were not even<br>
&gt;&gt; defined by the developer themselves -- e.g.: included in a JAR file.)<br>
&gt;<br>
&gt; huh?<br>
&gt;<br>
&gt;&gt; Does this feature really buy us much?<br>
&gt;<br>
&gt; Well, it lets you encapsulate all the information about the form<br>
&gt; validator in exactly one place, saving you the need to add a special<br>
&gt; tag to your JSF page. And keeping all information about validation<br>
&gt; outside of the view definition (which is the case with single-field<br>
&gt; validation via bean validation annotations). Now, I would not argue<br>
&gt; that this is something super-important from a software engineering<br>
&gt; perspective, but it certainly looks clean and is convenient in the<br>
&gt; common case. When I looked at the &lt;formValidator/&gt; tag in the JSF<br>
&gt; view, it looked anything but clean. I&#39;m talking pure aesthetics here.<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Gavin King<br>
&gt; <a href="mailto:gavin.king@gmail.com" target="_blank">gavin.king@gmail.com</a><br>
&gt; <a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
&gt; <a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
&gt; <a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
Gavin King<br>
<a href="mailto:gavin.king@gmail.com" target="_blank">gavin.king@gmail.com</a><br>
<a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
<a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
<a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div><div></div><div class="h5">-- <br>Lincoln Baxter, III<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>
&quot;Keep it Simple&quot;<br>

</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>