Jorge Godoy wrote: > bruno desthuilliers <[EMAIL PROTECTED]> writes: > > >>* first thing: >>an interesting feature of Zope is the ability to have multiple submits >>on the same form, with a naming scheme specifying the real action for >>the form, ie: >> <submit name="handlerMethodName:method" .... /> >>will use <current_controller>.handlerMethodName() as handler (ZPublisher >>takes care of this dispatch) >> >>(err... not sure I'm very clear... sorry) >> >>This is definitively something I'd like to have in a TG forms/widgets >>framework, and I thinks this could be easily implemented in TG (at least >>with a default() handler doing the dispatch, but there may be better >>options with cherryPy filters or whatever) > > > How about JavaScript handling 'onclick' events? It would work the same > way...
Nope, cause it won't work without javascript. It has to be on the server IMHO. > What you will call and how will depend just on how creative you are to > write the code :-) > > I'm using multiple buttons on some forms and I'm doing this. > > >>* Next thing is about form layout: >> >>The TableForm strategy is a first angle, but it will only work for very >>simple forms[1]. > > > IMHO, more complex layouts should be handled at the template, since this is > very specific and very tied to presentation... The common code should be as > simple as possible to make things fast. html forms are so braindead that writing complex forms by hand is a perfect nightmare. Lot of tedious and error prone repetitions etc. OTOH, describing form layouts with Python code - or even better if possible with Python dicts and lists - is quite easy, requires much less typing, and <dreaming-out-loud>could even be GUI-driven (hey, after Catwalk and ModelDesigner, what about a TTW FormDesigner ?-)</dreaming-out-loud>. -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com

