I know. They were just regular good practice suggestions. Sorry. Will look for a solution.
On Aug 4, 6:44 pm, G <glenn.calt...@gmail.com> wrote: > Hi Massimo, > Thank you for the suggestions. I have implemented both, but neither > helps with the original problem of having components with multiple > buttons work with ajax=True. My new controller generates several forms > each with just one button and with distinct formnames. It has an if > form.accepts clause for each form to do the required action, and then > returns all the forms to the view to be properly formatted. It seems a > bit clumsy, but also seems to be working. > Thanks again, > G > > On Aug 4, 4:36 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> > wrote: > > > > > > > > > if you do not need a view and your component only displays the form > > you can just "return form" and pypass the generic view. It will be > > faster. I also suggest you use ajax=True. Always call the component > > directly as a test that it is working. > > > On Aug 4, 6:33 pm, G <glenn.calt...@gmail.com> wrote: > > > > I think I found a workable (but slightly annoying) solution: create > > > several mini-forms that only have the submit button, each with a > > > different form name. Then I can just use many > > > if form_blah.accepts(request.vars, session, formname='form_blah'): > > > clauses. I'd still be interested in knowing if there is a better way. > > > Another idea I toyed with was using jQuery to connect the .click > > > action of a button to cause a jQuery.post(URL('myfunction'), > > > {button_name : "yes"}) to send the button press to myfunction, but I'm > > > new to jQuery, so didn't put much time into trying it and don't know > > > if it would work. > > > Thanks, > > > G > > > > On Aug 4, 2:23 am, pbreit <pbreitenb...@gmail.com> wrote: > > > > > Coupla other > > > > approaches:http://www.johnnycode.com/blog/2010/04/08/jquery-form-serialize-doesn...... > > > > > I'm surprised Jquery doesn't provide better support for this. Seems > > > > like a > > > > common pattern.