Matt Feifarek wrote: > On Jan 20, 2008 8:33 PM, Ian Bicking <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > The option no one seems to consider, but which I continue to advocate, > is using FormEncode with htmlfill and ad hoc templates to generate the > actual HTML forms (because once you take out the value filling, error > filling, and validation, it's easy to generate HTML forms). > > > > Yeah, your position on that is well-known ;-) It's a philosophy I agree > with, but my practical needs trumped philosophy, and I was hoping that > ToscaWidgets would make my life easier. Doh. > > I tried pure formencode for a project, but what I ended up with was a > giant if-elseif-else tree in every single controller action. And crazy > complicated conditional logic in every single template. I guess I never > figured out how to get htmlfill to work; the docs[1] made it sound > fishy, and it seemed just too "magic" for me. I didn't like the idea of > leaving markers in the template for errors. I guess I should try again.
You don't technically have to leave markers in the templates; if you don't leave them there they are put in automatically right before the field with the error. The @validate decorator in Pylons helps with some of this. But anything that effects control flow is tricky to work with. Ian ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss