There are a variety of things you can do.
You can:
1) Put validation annotations on the bean properties that tapestry will pick up 2) Put validation information in the property catalogs that tapestry will pick up 3) Write and contribute your own constraint generator. For example, in the tapestry5-cayenne integration module, there is a CayenneConstraintGenerator that builds constraints based on metadata available from the cayenne mapping.

For AppFuse, I would recommend #2 because it's non-intrusive (nothing in the POJO) and it allows you to use the BeanEditForm, and it allows you to easily modify (w/out compilation) the validation constraints.

Cheers,

Robert

On May 4, 2009, at 5/410:26 AM , mraible wrote:


Thanks for the pointer. I guess for something like AppFuse, using the
BeanEditForm (esp. with code generation) is probably not a good idea. I'll change things to generate the individual field elements so users can more
easily modify the generated template.

Matt


Ulrich Stärk wrote:

I don't exactly get what you mean. You can validate for example textfield
by passing a validator to
the validate parameter of some of the components. For example <t:textfield
value="someProperty"
validate="required /> would make sure that someProperty actually has a
value. See
http://tapestry.apache.org/tapestry5.1/guide/validation.html

Uli

mraible schrieb:
Is it possible to do validation declaratively, or rather - only at the
web
tier? AFAIK, I can only do validation with 1) annotations on the model
object or 2) manually with if (blank) logic in my Page.

Thanks,

Matt


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




--
View this message in context: 
http://www.nabble.com/Tapestry-5-Validation-tp23358011p23370724.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


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

Reply via email to