(whoops, i accidentally sent this to zope3-dev; re-sending.) I'm wondering what's a nice way to deal with (server-side) validation of a form composed of multiple viewlets. I don't think I really want to move to a full-featured forms framework yet, they all seem a little overly complex to me.
In the viewlet code, the obvious thing to do would be to raise an exception in its update() method if there's a problem, otherwise save the data or whatever. This is what Philip does in his worldcookery viewlet examples. But this means you only ever see the first error. In order to show the user *all* the validation errors at once, something (the viewlet manager?) would have to catch those exceptions. And having done that, we would need to explicitly abort the transaction. I'm not sure the best place to do that. I could just poke around until I get something working, but I was hoping somebody here would already have a nice example I can look at. Should I just get used to the idea of using z3c.form or some such? -- http://www.slinkp.com _______________________________________________ Zope3-users mailing list Zope3email@example.com http://mail.zope.org/mailman/listinfo/zope3-users