OK I do now understand whats going on here - thanks
But if I added all Maven dependencies I get compilation errors.
It seems that the ExtVal version of the EntityManager does not have the
method
getCriteriaBuilder() but why?

This code breaks:
public List<T> findAll() {
        javax.persistence.criteria.CriteriaQuery cq =
getEntityManager().getCriteriaBuilder().createQuery();
        cq.select(cq.from(entityClass));
        return getEntityManager().createQuery(cq).getResultList();
}

(error: cannot find symbol)


> yes - it works because jpa validates it again (per default). but it
> shouldn't get to this point, because (as you see) jsf can't process it
> automatically and some parts of your business logic might get executed
as
> well (before the first validation gets executed).
>
> fyi:
> if you would like to use extval, please add the core explicitly. it's
just
> included as transitive dependency due to a workaround for the old
build
> setup. as soon as we have time for a full cleanup of the build files,
it
> will change for the releases afterwards.
>
> @generic support module: see [1]
>
> regards,
> gerhard
>
> [1] http://www.mail-archive.com/[email protected]/msg57682.html
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2011/8/23 <[email protected]>
>
> > First of all thanks for the quick response.
> > I checked out the examples and the wiki. But I don't understand why
I
> > should
> > provide these extra possibility's for validation, because my
constraint
> > is working as
> > mentioned in the primefaces forum post. It's all just about passing
this
> > result of
> > validation inside the entity manager to JSF ?
> >
> > Regards
> > Alesandro
> >
> > > hi alesandro,
> > >
> > > first of all: welcome @ myfaces!
> > >
> > > for cross-validation you need the property-validation module (!=
> > > bean-validation) and for advanced bean-validation you need the
> > > bean-validation module (+ the bv implementation of your choice).
> > > in any case you need the core of extval. for primefaces it's also
> > suggested
> > > to use the generic support module.
> > >
> > > you can find hello world examples at [1]. furthermore, you might
be
> > > interested in the wiki [2] and a chapter about extval [3]. both
> > contain
> > > detailed information about such topics.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > >
> >
> >
https://svn.apache.org/repos/asf/myfaces/extensions/validator/trunk/examples/
> > > [2] https://cwiki.apache.org/confluence/display/EXTVAL
> > > [3]
> >
http://people.apache.org/~gpetracek/myfaces/extval/extval_chapter.html
> > >
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > > 2011/8/23 <[email protected]>
> > >
> > > > Hello,
> > > >
> > > > I tried to make a cross field BeanValidation with a custom
> > annotation.
> > > > (based on JEE6 /
> > > > JSF2) The validation works correct but it's not passed to the
JSF
> > view.
> > > > I wrote about
> > > > this in the Primefaces forum
> > > > http://forum.primefaces.org/viewtopic.php?f=3&t=14569
> > > > . It would be nice if someone would have a look at this (maybe
Iam
> > just
> > > > getting
> > > > something basic wrong with ExtVal).
> > > >
> > > > Regards
> > > > Alesandro
> > > >
> > >
> > >
> >
>
>

Reply via email to