Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E83F597AE for ; Thu, 8 Mar 2012 19:50:58 +0000 (UTC) Received: (qmail 12912 invoked by uid 500); 8 Mar 2012 19:50:58 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 12874 invoked by uid 500); 8 Mar 2012 19:50:58 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 12866 invoked by uid 99); 8 Mar 2012 19:50:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 19:50:58 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gturner@unzane.com designates 184.105.220.20 as permitted sender) Received: from [184.105.220.20] (HELO azathoth.unzane.com) (184.105.220.20) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 19:50:52 +0000 Received: from zoth-ommog.unzane.com (zoth-ommog.unzane.com [IPv6:2001:470:e861::8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "zoth-ommog.unzane.com", Issuer "CAcert Class 3 Root" (verified OK)) by mail.unzane.com (Postfix) with ESMTPS id 1FF97240076 for ; Thu, 8 Mar 2012 11:50:32 -0800 (PST) Authentication-Results: mail.unzane.com; dkim=none (no signature); dkim-adsp=fail (insecure policy) Received: by zoth-ommog.unzane.com (Postfix, from userid 1000) id D26D111B0072; Thu, 8 Mar 2012 11:50:31 -0800 (PST) From: Gerald Turner To: "MyFaces Discussion" Subject: Re: ExtVal BV question References: <87d38pi9wt.fsf@zoth-ommog.unzane.com> <87vcmhgngf.fsf@zoth-ommog.unzane.com> X-Face: "W];.?_H%>pNFRH&Q,:krZ>##I-,/Amy=($Mfy{aW5KR1F{kbD:ElXd{pLW'5L!2rhI/$|7 R\LU=FijzO8vUv.t0^YwT~!AK[bX6d]?j4!s=-m&E~B]=zGdY4c (Rudy De Busscher's message of "Wed, 7 Mar 2012 09:44:22 +0100") Message-ID: <87ipiehny2.fsf@zoth-ommog.unzane.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Virus-Checked: Checked by ClamAV on apache.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Rudy De Busscher writes: > first, welcome to the mailing list. Thanks! > a) about the multifield ConstraintValidator. > You see the messages twice since you set 2 ConstraintViolation on the > context. And to my knowledge there is no link between the > propertyPath and the component the message is intended to. Not in the > JSR303 and thus not in the ExtVal support for it. Can you please > point us to the info (spec) if we are wrong. In JSR303 =C2=A7 4.2 ConstraintViolation, there is the following note: =E2=80=9CFrom rootBean and propertyPath, it is possible to rebuild the context of the failure=E2=80=9D The chapter continues with several examples of these Node/Path objects. Unfortunately the specification doesn't make any further statements about how JSF or any other toolkits *should* infer what components are in violation, but the spec is framework agnostic afterall=E2=80=A6 > b) Validation in 2 phases > This is due to the fact that you need all the field values in the > model before you can do any multifield validation. > > Within the Process Validation phase, the JSF validations on a single > field takes place (required, within limits, etc ...). ExtVal then also > processes the BeanValidation annotations which are placed on the > field/method like @Size, @NotNull etc ... > > But the multi field validation can't be performed at that moment > because it requires that the screen values are propagated to the > managedBean. This is because the ConstraintValidator needs the object > populated with the values to do his checks. This means it can be only > done after the 'update model values' phase and thus only performed > when no problems are found yet. > > Hopes this clarifies the things a bit. Yes this makes sense, I just wanted to clarify I wasn't doing something wrong, missing configuration, etc. I think it is acceptible for the user interface that the more complex validations happen in a second pass. =2D-=20 Gerald Turner Email: gturner@unzane.com JID: gturner@unzane.com GPG: 0xFA8CD6D5 21D9 B2E8 7FE7 F19E 5F7D 4D0C 3FA0 810F FA8C D6D5 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk9ZDYUACgkQP6CBD/qM1tWivgCgkk8qYP4NmV6HYhtGrMbQ5UL7 hW4Anj83yVz11xY1I36Zdj3T1zJeHapG =nuOs -----END PGP SIGNATURE----- --=-=-=--