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.

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..

16.10.2009, в 01:27, "Thiago H. de Paula Figueiredo" <thiag...@gmail.com> написал(а):

Em Thu, 15 Oct 2009 20:16:51 -0300, Igor Drobiazko <igor.drobia...@gmail.com > escreveu:

A further argument not to do the validation inside the form component
is the decoration of fields. In case of errors more code is needed to
highlight the fields in error.

I'm proposing that the Form component should invoke the object validation service after the property-level validation is done and then registering the erros using form.recordError();. This way, field decoration works as it works now,

--
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org

Reply via email to