Johannes Textor schrieb: > Derek Hohls schrieb: > > >>Ah. .So you were actually saying "you can >>define a single set of validation criteria _could be_ used to generate >>whatever validation is performed both client side and server side" >> >>Obviously, Cocoon only generates the server side validation >>code at present - but it seems to me there is no reason why one >>cannot write a generic "forms validation Javascript" code generator >>to be distributed as part of future Cocoon releases... this would >>save a *lot* of rework for those wishing to do client side *and* >>server side validation [each has its place, after all]. >> > > I think this "generator" might boil down to a stylesheet which is > applied to the CForms def. and converts it to a javascript (text/plain) > - file. It should also contain error messages which could be > internationalized the usual way. Then the validation scenario could be > as follows: > > - User clicks "save / update" on a "screen" in the ajax app - where all > fields on that screen form a CForm > - The fields are validated using the JS generated from the Forms def. file
note how validation is done here: oh hey, BTW: AJAX is harder to link to ... http://www.netvibes.com/ --> Sign In --> New User the frame of the input field changes from red to green as soon as the input is valid js > - JS Error message if something went wrong > - If not, client / server trip (the first one!) to store data. Repeat > validation on server to avoid data corruption. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg Fon +49 (0)7141 377 000 * Fax +49 (0)7141 377 00-99 Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 * D-81825 München www.uidesign.de Besuchen Sie uns auf dem World Usability Day am 3. Nov. 2005 in Stuttgart oder München. Unter dem Motto "Making It Easy" finden Sie interessante Exponate und Vorträge. http://www.worldusabilityday.de/ Buch "User Interface Tuning" von Joachim Machate & Michael Burmester www.user-interface-tuning.de --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
