Ben, There exists 2 version because the handling of Bean Validation annotations is completely different then the 'standard' ones (you are using JPA annotations but there exists also ExtVal annotations like @Required that do more or less the same as the Bean Validation annotations)
The issue that you have now is that the Required Label add-on (BV version) is not recognizing the NON Bean validation annotations. I'll have a look now that I know more of the context. Did you add only the bean-validation module to the project or also property-validation module ? But commenting out the super.initComponent as you proposed will result in not recognizing the Bean validation annoations anymore. Rudy. On 27 October 2010 16:09, <neum...@ijet.com> wrote: > Rudy, > I haven't tried the non-bean version yet but was just wondering if this is > the only difference between the two versions? > If so, why not just make one version that applies the correct component > init/config method based on the annotation type (bean vs property)? > > Ben > > -----Original Message----- > *From:* neum...@ijet.com [mailto:neum...@ijet.com] > *Sent:* Wednesday, October 27, 2010 9:40 AM > *To:* dev@myfaces.apache.org > *Subject:* RE: ext-bv addon: Required Initialization for labels required > change > > Hi Rudy, > > I am using both property and bean validation. The labels of concern, > though, are annotated using @Column(...nullable=false). So perhaps we've > discovered my issue. Thanks! > I will drop in the non-bean validation version and see how that works. > Is there any reason why I can't/shouldn't use both? > > Finally, the target component is standard JSF. > > Thanks! > Ben > > > -----Original Message----- > *From:* Rudy De Busscher [mailto:rdebussc...@gmail.com] > *Sent:* Wednesday, October 27, 2010 8:40 AM > *To:* MyFaces Development > *Subject:* Re: ext-bv addon: Required Initialization for labels required > change > > Hello Ben, > > I made a few checks and within my examples everything works (they don't use > Richfaces however). Can it be that you are mixing some environments ?? > > The line of code > *ExtValUtils.**configureComponentWithMetaData**(facesContext, > targetComponent, ExtValUtils.**getTransformedMetaData(**facesContext, > targetComponent));* > > is typical for the usage WITHOUT bean validation. > > Are you using bean validation annotations (like > javax.validation.constraints.NotNull) on your properties? > > If not, there exists also an add-on for the non bean validation version. > > > Is the target component a richfaces faces component or a standard JSF one > ?? > > I try to check with a RichFaces component tomorrow. > > regards > Rudy. > > > On 26 October 2010 22:32, Gerhard <gerhard.petra...@gmail.com> wrote: > >> hi ben, >> >> thx for the information - we will check it! >> (we haven't released the add-on - so we have to do some final tests.) >> >> @rudy: >> it would be nice if you can check the change with your applications. >> >> regards, >> gerhard >> >> http://www.irian.at >> >> Your JSF powerhouse - >> JSF Consulting, Development and >> Courses in English and German >> >> Professional Support for Apache MyFaces >> >> >> >> 2010/10/26 <neum...@ijet.com> >> >> >>> Just a short note that may be of interest. >>> I was unable to get the ext-bv addon: Required Initialization for labels >>> working "out of the box". >>> >>> After modifying >>> at.gp.web.jsf.extval.beanval.label.interceptor.BeanValidationAwareLabelRendererInterceptor >>> as follows, it seems to work well now. >>> >>> protected void initComponent(FacesContext facesContext, UIComponent >>> uiComponent) >>> { >>> ... >>> //super.initComponent(facesContext, targetComponent); >>> ExtValUtils.configureComponentWithMetaData(facesContext, >>> targetComponent, ExtValUtils.getTransformedMetaData(facesContext, >>> targetComponent)); >>> >>> ... >>> } >>> >>> Any thoughts on this change? Is it appropriate? >>> By the way, my web-app uses JSF 1.2, Facelets, RichFaces (3.3.3), >>> Restfaces, and Orchestra. >>> >>> Thanks! >>> Ben >>> >> >> >