myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jakob.ke...@gmx.net
Subject Re: extval, @Past for Date date
Date Thu, 23 Jun 2011 22:06:19 GMT
Hi Gerhard,

I think you got me wrong, I already used the hibernate validator. The problem is the name
of the property:

Date date;
vs.
Date dateOfSomething;

The annotation of the bean property with name "date" is not recognized by extval, but the
one of the property "dateOfSomething" is. Everything is working for me, except that I can't
use properties named as "date". I can't believe that this is correct.

Regards,
Jakob


-------- Original-Nachricht --------
> Datum: Thu, 23 Jun 2011 18:12:08 +0200
> Von: Gerhard Petracek <gerhard.petracek@gmail.com>
> An: MyFaces Discussion <users@myfaces.apache.org>
> Betreff: Re: extval, @Past for Date date

> hi jakob,
> 
> @Past is a bean-validation annotation.
> myfaces-extval-bean-validation is just an adapter for bean-validation
> which
> adds additional features as well as bv-support for jsf 1.x.
> so you have to add an implementation of bean-validation e.g. apache bval
> or
> hibernate validator v4 (besides the core and the bv module of extval) to
> your project.
> you can have a look at the examples [1] in the repository - e.g. [2] for
> jsf2.
> 
> regards,
> gerhard
> 
> [1] https://svn.apache.org/repos/asf/myfaces/extensions/validator/
> [2]
> https://svn.apache.org/repos/asf/myfaces/extensions/validator/tags/extval-2.0.4/examples/hello_bean-validation/pom.xml
> 
> http://www.irian.at
> 
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
> 
> Professional Support for Apache MyFaces
> 
> 
> 2011/6/23 <jakob.keres@gmx.net>
> 
> > Hello,
> >
> > seems to be a bug of extval, the following is not working:
> >
> > @Past(message = "...")
> > @Temporal(TemporalType.DATE)
> > private java.util.Date date;
> >
> > Hibernate recognizes it correctly but I don't get a message in the JSF
> > frontend. If I change the code to
> >
> > @Past(message = "...")
> > @Temporal(TemporalType.DATE)
> > private java.util.Date dateOfSomething;
> >
> > it behaves as supposed.
> >
> > Ciao,
> > Jakob
> > --
> > NEU: FreePhone - kostenlos mobil telefonieren!
> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> >

-- 
NEU: FreePhone - kostenlos mobil telefonieren!			
Jetzt informieren: http://www.gmx.net/de/go/freephone

Mime
View raw message