Morning,
The round of questioning continues. How would I go about doing field validation nicely? Say, an amount field that contains a valid description of a numeric amount. I can think of three ways of doing it: - Client side JavaScript: is there any abstraction model for this in Seaside or Scriptaculous? - Server side processing: could validate the fields in the form submit callback and return back to the form with some feedback - AJAX: could validate the field on the server as soon as user leaves it, any good examples of this? Thanks! -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside smime.p7s (4K) Download Attachment |
Boris,
Have a look at the store example in Seaside-Examples-Store. Specifically, have a look at the class comments in WAStoreCreditCard. They may be a good starting point to guide your thinking on server-side model validation. Hope this helps, Chad On 5/30/06, Boris Popov <[hidden email]> wrote: > Morning, > > The round of questioning continues. How would I go about doing field > validation nicely? Say, an amount field that contains a valid description of > a numeric amount. I can think of three ways of doing it: > > - Client side JavaScript: is there any abstraction model for this in Seaside > or Scriptaculous? > - Server side processing: could validate the fields in the form submit > callback and return back to the form with some feedback > - AJAX: could validate the field on the server as soon as user leaves it, > any good examples of this? > > Thanks! > > -Boris > > -- > +1.604.689.0322 > DeepCove Labs Ltd. > 4th floor 595 Howe Street > Vancouver, Canada V6C 2T5 > > [hidden email] > > CONFIDENTIALITY NOTICE > > This email is intended only for the persons named in the message > header. Unless otherwise indicated, it contains information that is > private and confidential. If you have received it in error, please > notify the sender and delete the entire message including any > attachments. > > Thank you. > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Chad Nantais wrote:
> Boris, > > Have a look at the store example in Seaside-Examples-Store. > Specifically, have a look at the class comments in WAStoreCreditCard. > They may be a good starting point to guide your thinking on > server-side model validation. Sorry for resurrecting an older thread, but I had a few questions I wanted to ask.. Specifically, for those of you using field validation within Seaside forms, are you using that in conjunction with WAModelProxy or stand-alone without it? Also -- are you validating the fields at the end of your form processing (care of your submitButton callback:) or within each of the various field callbacks? Also -- are there any pitfalls to watch out for? I'm trying to get all of my ducks lined up before I rewrite code over-n-over-n-over.. Thanks! -- Rick _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |