> Thanks for your response. Could you explain what you mean by keeping my
> validation "in the correct callback"?



I think it's about writing clean and maintainable code.
For other developers reading back your code it makes more sense if you add
your validation errors in the ValidateForm event and to perform some
(database?) action in the success handler.

The ValidateForm event is where validation errors are added and some of them
are automatically taken care of for you by the Tapestry validator mechanism.
If you don't want to add more than one error-message, you can easily check
if the field is in error already.
Sometimes it also makes sense to add mutiple errors per field since you're
telling the user immediately what (s)he's doing wrong instead of having them
re-submit again only to find yet another validation error on the same field.


regards,

Onno

Reply via email to