Re: Automated Validation of Attributes

From: Andrew Lindesay (ap..indesay.co.nz)
Date: Wed Mar 10 2010 - 13:38:27 EST

  • Next message: Mike Kienenberger: "Re: Automated Validation of Attributes"

    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



    This archive was generated by hypermail 2.0.0 : Wed Mar 10 2010 - 13:38:54 EST