I'm not familiar enough with Hibernate Validator to say.

On 6/11/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
Hi Howard,

On Sat, 2007-06-09 at 22:44 +0200, Martin Grotzke wrote:
> Does this enable us to use hibernate validator in our business layer
> that is completely independent from tapestry?
> Hibernate validator is right now our favorite option for validation,
> but it might be that we have to use an own implementation - we're still
> evaluating.
>
> What we're sure about is that in the business layer validation is
> performed and that for each validation error details are provided
> that should allow the presentation layer to map this information
> to a specific field/element.
>
> IMHO a good solution for this use case is recording the error with
> the element name, without being forced to have a Field for each
> element.
>
> What do you think?
Do you have any comments/feedback concerning this?

Thanx && cheers,
Martin


>
> Cheers,
> Martin
>
>
>
> On Sat, 2007-06-09 at 12:48 -0700, Howard Lewis Ship wrote:
> > That's true ... though I expect to make Tapestry smarter about
> > recognizing the Hibernate annotations and producing automatic client-
> > and server-side validation for them.
> >
> > On 6/9/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > > We want to do validation in the business layer (with hibernate
> > > validator) and get back an exception with a list of invalid values,
> > > where each invalid value provides the property path.
> > >
> > > Then we want to have a mapping of the property path to the element
> > > name and record an error for this on the tapestry form.
> > >
> > > The value is to be able to use hibernate validator in our business
> > > layer and not to be forced to define each Field in the page class,
> > > which is better in terms of performance and saves unnecessary work.
> > >
> > > Cheers,
> > > Martin
> > >
> > >
> > > On Sat, 2007-06-09 at 10:07 -0700, Howard Lewis Ship wrote:
> > > > I don't see the value ... how would you obtain the element name
> > > > without getting the field itself; and if you've injected the field (to
> > > > invoke getElementName() ), then why wouldn't you just pass the field
> > > > to the tracker?
> > > >
> > > > Convince me there's something actually missing.
> > > >
> > > > On 6/9/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > > > > Hello,
> > > > >
> > > > > right now there's a recordError(Field,String) method for storing
> > > > > errors for elements of the page.
> > > > >
> > > > > We would like to have also a method recordError(String,String) where
> > > > > the first parameter is the element name.
> > > > >
> > > > > The ValidationTrackerImpl seems to use only the elementName of the
> > > > > Field:
> > > > >
> > > > >     private FieldTracker get(Field field)
> > > > >     {
> > > > >         String key = field.getElementName();
> > > > >
> > > > >         refreshFieldToTracker();
> > > > >
> > > > >         FieldTracker result = InternalUtils.get(_fieldToTracker, key);
> > > > >
> > > > >         if (result == null)
> > > > >             result = new FieldTracker(key);
> > > > >
> > > > >         return result;
> > > > >     }
> > > > >
> > > > > so an additional method seems to be not a big issue.
> > > > >
> > > > > Would this be possible to add to T5? Shall we submit a patch for this
> > > > > here in the list or enter an issue?
> > > > >
> > > > > Thanx && cheers,
> > > > > Martin
> > > > >
> > > > >
> > > > > --
> > > > > Martin Grotzke
> > > > > Dipl.-Inf.
> > > > >
> > > > > freiheit.com technologies gmbh
> > > > > Straßenbahnring 22 / 20251 Hamburg, Germany
> > > > > fon       +49 (0)40 / 890584-0
> > > > > fax       +49 (0)40 / 890584-20
> > > > > HRB Hamburg 70814
> > > > >
> > > > > eb0e 645c 9730 c8a3 ee2f  1b9a 5de5 21cb c259 fe34
> > > > > Geschäftsführer: Claudia Dietze, Stefan Richter, Jörg Kirchhof
> > > > >
> > > > >
> > > >
> > > >
> > > --
> > > Martin Grotzke
> > > http://www.javakaffee.de/blog/
> > >
> > >
> >
> >
--
Martin Grotzke
http://www.javakaffee.de/blog/




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to