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 23E92D57D for ; Fri, 19 Oct 2012 10:39:44 +0000 (UTC) Received: (qmail 88604 invoked by uid 500); 19 Oct 2012 10:39:43 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 88359 invoked by uid 500); 19 Oct 2012 10:39:42 -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 88335 invoked by uid 99); 19 Oct 2012 10:39:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 10:39:41 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.149.113.165] (HELO tcmail13.telekom.de) (80.149.113.165) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 10:39:37 +0000 Received: from he111494.emea1.cds.t-internal.com ([10.206.92.97]) by tcmail11.telekom.de with ESMTP/TLS/AES128-SHA; 19 Oct 2012 12:39:12 +0200 Received: from HE111490.emea1.cds.t-internal.com ([10.206.92.87]) by HE111494.emea1.cds.t-internal.com ([::1]) with mapi; Fri, 19 Oct 2012 12:38:10 +0200 From: To: Date: Fri, 19 Oct 2012 12:38:09 +0200 Subject: AW: @BeanValidation annotation at class level Thread-Topic: @BeanValidation annotation at class level Thread-Index: Ac2tacZZoRFjp4KCSBqQge3Iy2OAhgAeGxag Message-ID: <3B8CC2E826F6B844B471DC3DF590CB45EEC596952D@HE111490.emea1.cds.t-internal.com> References: <3B8CC2E826F6B844B471DC3DF590CB45EEC58C41BB@HE111490.emea1.cds.t-internal.com> In-Reply-To: Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi Gerhard, thanx for quick response. I tracked down the problem that the Annotation (@= BeanValidation) is not available on objectToInspect.getClass() in ExtValBea= nValidationMetaDataInternals#transferGroupValidationInformationToFoundGroup= s. objectToInspect.getClass() returns a bytecode enhanced proxy class (...Dlg_= $$_javassist_85) where I can see only the @RequestScoped Annotation from CD= I. Besides @BeanValidation also the @Named Annotation from CDI is missing. I don't know if this behavior of a byte code proxy is correct!? I would exp= ect that at least Annotations from Retention CLASS and RUNTIME are also ava= ilable on the proxies. I also wonder a little why ExtValBeanValidationMetaDataInternals#processCla= ss does not use the classToInspect (Unproxied Class) to gather the Annotati= ons. If this method would pass classToInspect instead of objectToInspect to= the #transferGroupValidationInformationToFoundGroups everything should be = fine. Any help with this issue is appreciated! Regards, Manuel -----Urspr=FCngliche Nachricht----- Von: Gerhard Petracek [mailto:gerhard.petracek@gmail.com]=20 Gesendet: Donnerstag, 18. Oktober 2012 21:49 An: MyFaces Discussion Betreff: Re: @BeanValidation annotation at class level hi manuel, you can check it in ExtValBeanValidationMetaDataInternals# extractExtValBeanValidationMetaData (see #inspectFirstBean (=3D class level), #inspectFirstProperty, #inspectBa= seOfProperty (=3D class level) and #inspectLastProperty) regards, gerhard http://www.irian.at Your JSF/JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2012/10/18 > Hello MyFaces ExtVal users, > > I've a question regarding group validation together with=20 > @BeanValidation annotation. In my example the @BeanValidation=20 > annotation only works on page bean fields. On class level it seems that t= he annotation is ignored. > > This works: > @BeanValidation(useGroups=3DIUiGroupStage2.class) > private String wmc; > > This doesn't work: > @BeanValidation(useGroups=3DIUiGroupStage2.class) > public class HomeDlg implements Serializable { > > The following documentation states that it should be possible to=20 > declare the annotation at class level: > http://wiki.apache.org/myfaces/Extensions/Validator/DevDoc > But now how can I make it run? Is there some configuration to be done? > > Thanx in advance! > Manuel > >