> On Fri, 29 Oct 2004 21:44:52 +0800, Yar Hwee Boon
> <hboon(a)motionobj.com>
> wrote:
>
> > However, how do I validate input which is non-digit? The #amount:
>
> Just to clarify, I mean how do I valiate short of using Javascript.
I think your should not update your domain objects directly.
I would use the command pattern, i.e. the model of your
Seaside component should be a command. You would collect
all the command data using the callbacks of your component
Then the callback attached to the OK button would send #execute
to the command object. Assuming that #execute performs the
validation, you would get an exception describing the error(s).
On the next rendering, you would alter the display to using
the error description(s).
Did you have a look to Mewa ? It does validation using another
technique where you have a meta-wrapper for every aspects of
the domain object. But again the domain object is not updated
directly.
Hope this helps,
Michel.