cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Lindesay <...@lindesay.co.nz>
Subject Re: Automated Validation of Attributes
Date Wed, 10 Mar 2010 18:38:27 GMT
I'm just waking up too!

You are right, it is somewhat "web framework" dependent; if you are using Tapestry-5 then,
does the 'onValidateFromFirstName' get invoked from the 'validateForSave' in the data objects
somehow as well or do you need to handle single-attribute validation manually from that point?

Regards;

> Part of this would depend on your UI, too.  If you are using Tapestry
> 5, for example, it has similar validation built in.  Say you have a
> text field with an id=firstName, T5 will invoke (if present)
> onValidateFromFirstName(String newFirstName) for you before ever
> calling the setter.  If you throw an exception out of that, T5 will
> know not to call the setter.  Once you've gone past that logic (which
> would be the case you mention) it is a bit too late ...

___
Andrew Lindesay
www.lindesay.co.nz


Mime
View raw message