myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: Apache ExtVal: Annotation "@BeanValidation(useGroups = SkipValidation.class)" has no effect for properties, annotated with @Column
Date Wed, 13 Nov 2013 14:04:14 GMT
that's correct. you can file a feature request for it (at [1]).
if we provide it in extval-core, we can support both with one annotation.

regards,
gerhard

[1] https://issues.apache.org/jira/browse/EXTVAL

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2013/11/13 Alexey Shakov <alexey.shakov@menta.de>

> Hi Gerhard,
>
> which version of extval-bypass add-on is compatible with extval 2.0.7?
>
> I'm trying to use following maven configuration:
>
> <repository>
>       <id>googlecode.com</id>
> <url>http://os890-m2-repository.googlecode.com/svn/tags/os890</url>
> </repository>
>
> <dependency>
>       <groupId>at.gp.web.jsf.extval </groupId>
> <artifactId>extval-annotation-based-bypass-validation</artifactId>
>       <version>1.2.2</version>
> </dependency>
>
>
> But it seems, like this version is not compatible with extval 2.0.7
>
> Best regards,
>
> Alexey
>
> Am 12.11.2013 16:12, schrieb Gerhard Petracek:
>
>> hi alexey,
>>
>> if it used to work, it should still work -> please file an issue and i'll
>> check it.
>> (it would be great, if you can provide a simple demo-app which illustrates
>> the issue.)
>>
>> regards,
>> gerhard
>>
>> http://www.irian.at
>>
>> Your JSF/JavaEE powerhouse -
>> JavaEE Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>>
>> 2013/11/12 Alexey Shakov <alexey.shakov@menta.de>
>>
>>  Hi Gerhard,
>>>
>>> thank you for the explanation, i understand the background.
>>>
>>> But what would be the solution for my problem?
>>> I use validation constraints in the form of jpa, jsr-303 and also
>>> extval-specific annotations. All I need is just to skip JSF-Validation of
>>> empty fields for some GUI-Actions (immediate=true is not an option,
>>> since i
>>> need intermediately save the values in my conversation-scoped bean).
>>>
>>> Earlier (with MyFaces 1.2.x) I've used extval with bypass-addon for this
>>> purpose. Since MyFaces  2.1.x this combination does not work.
>>>
>>> Can you give please some hints? I think, it is a very common case for
>>> each
>>> more or less complicated web-app, when the user fills the properties of
>>> some session- (or conversation-) scoped) java-bean having intermediate
>>> Ajax-requests (JSF-Actions) at the background.
>>>
>>> Thank you in advance for your help.
>>>
>>> Best regards,
>>>
>>> Alexey
>>>
>>> Am 11.11.2013 23:40, schrieb Gerhard Petracek:
>>>
>>>   hi alexey,
>>>
>>>> #1 is supported by [1]
>>>> and
>>>> #2 is supported by [2]
>>>>
>>>> extval started with [1] and [2] was added later on (once bv was
>>>> finished).
>>>> extval itself doesn't force specific constraint-rules (-> it was
>>>> possible
>>>> to support #1 with [1]).
>>>> however, since [2] delegates most parts to the bv-implementation of your
>>>> choice and bv forces specific constraint-rules, [2] can't support #1.
>>>> (fyi: a jpa-provider can support #2 as well)
>>>>
>>>> regards,
>>>> gerhard
>>>>
>>>> [1]
>>>> http://svn.apache.org/repos/asf/myfaces/extensions/
>>>> validator/trunk/validation-modules/property-validation/
>>>> [2]
>>>> http://svn.apache.org/repos/asf/myfaces/extensions/
>>>> validator/trunk/validation-modules/bean-validation/
>>>>
>>>> http://www.irian.at
>>>>
>>>> Your JSF/JavaEE powerhouse -
>>>> JavaEE Consulting, Development and
>>>> Courses in English and German
>>>>
>>>> Professional Support for Apache MyFaces
>>>>
>>>>
>>>>
>>>> 2013/11/11 Alexey Shakov <alexey.shakov@menta.de>
>>>>
>>>>   Hi Gerhard,
>>>>
>>>>> thank you for a quick answer.
>>>>>
>>>>> I thought, that from JSF-Validation perspective following two notations
>>>>> must be the same:
>>>>>
>>>>> #1:
>>>>>
>>>>>
>>>>> @Column(name="NAME", length=80, nullable=false)
>>>>> private String name;
>>>>>
>>>>> #2
>>>>>
>>>>> @NotNull
>>>>> @Size (max=80)
>>>>> private String name;
>>>>>
>>>>>
>>>>> It is still not clear for me, why they are differently handled by
>>>>> @BeanValidation(useGroups = SkipValidation.class)
>>>>>
>>>>> Regards,
>>>>> Alexey
>>>>>
>>>>> Am 11.11.2013 15:12, schrieb Gerhard Petracek:
>>>>>
>>>>>    hi alexey,
>>>>>
>>>>>  there are 2 different validation-modules:
>>>>>> #1 property-validation (= extval-constraints + jpa-based validation)
>>>>>> #2 bean-validation (= better jsf-integration of bv)
>>>>>>
>>>>>> they follow different concepts -> with @BeanValidation (provided
by
>>>>>> #2)
>>>>>> you
>>>>>> can't control jpa-based validation (provided by #1).
>>>>>> further details are available at [1].
>>>>>>
>>>>>> regards,
>>>>>> gerhard
>>>>>>
>>>>>> [1] http://s.apache.org/EXTVAL_Chapter
>>>>>>
>>>>>> http://www.irian.at
>>>>>>
>>>>>> Your JSF/JavaEE powerhouse -
>>>>>> JavaEE Consulting, Development and
>>>>>> Courses in English and German
>>>>>>
>>>>>> Professional Support for Apache MyFaces
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2013/11/11 Alexey Shakov <alexey.shakov@menta.de>
>>>>>>
>>>>>>    Hi *,
>>>>>>
>>>>>>  I use Annotation "@BeanValidation(useGroups = SkipValidation.class)"
>>>>>>> on
>>>>>>> my
>>>>>>> action method to ignore the validation constraints, if it getting
>>>>>>> called
>>>>>>> from JSF-facelet.
>>>>>>>
>>>>>>> I've noticed, that this annotation works good for "standalone"
>>>>>>> constraints, such as @NotNull or @Size, but not for @Column.
>>>>>>> In my case, I have a Hibernate-Entity with a name-property, annotated
>>>>>>> like
>>>>>>> this:
>>>>>>>
>>>>>>> @Column(name="NAME", length=80, nullable=false)
>>>>>>> private String name;
>>>>>>>
>>>>>>> This property is getting always validated (length and not-null
>>>>>>> check),
>>>>>>> regardless of "@BeanValidation(useGroups = SkipValidation.class)"-
>>>>>>> annotation
>>>>>>> on corresponding action method.
>>>>>>>
>>>>>>> What is a reason for this behavior? Did I misunderstand something?
>>>>>>>
>>>>>>> (I use MyFaces 2.1.13, MyFaces extval 2.0.7, hibernate-validator
>>>>>>> 5.0.1.Final)
>>>>>>>
>>>>>>> Thanks for any help,
>>>>>>>
>>>>>>> Alexey
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message