Em Thu, 15 Oct 2009 20:42:52 -0300, Igor Drobiazko
<igor.drobia...@gmail.com> escreveu:
Jsr 303 validator return a set of constraints violetions. All
informations you have is the error message and property path. Now you
have to find the field a property is mapped to. the method recorderror
expects a field, not a property name. So some extra code is needed to
find the field.
You're absolutely right. I stumbled at this while implementing my
Hibernate Validator package. My partial solution was to record errors
without specifying the component.
Somebody in the user list already proposed to add a recordError(String
componentId, String message) method to Form. It's a very good idea, as we
wouldn't need to inject the field component to record an error for it. ;)
Let me start the work, so we can discuss code. The approach i suggest
requires really few changes. We can still change the implementation and
adjust to our needs..
That's a very good idea! :) Unfortunately, I can't code what I'm proposing
now (it shouldn't take of lot of code) because I'm in the last steps of
launching my current project, www.pronutricionista.com.br.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org