[Zope] Form parsing question - buttons and operand context

Michael S. Fischer michael@dynamine.net
Thu, 10 Oct 2002 16:17:49 -0700


Greetings,

I'm working on a Zope product that will render a table of items I'd like
the user to be able to commit actions upon.  The table would look
similar to this:

Item A  |  Edit (submit) | Delete (submit)
Item B  |  Edit (submit) | Delete (submit)

I'd like the "edit" and "delete" to be buttons.  I've seen examples in
which a method can be called from a form's submission button, e.g.

<input type=submit name="deleteObject:method" value="Delete">

I'd like to pass the operand to the form submission handler, but I know
of no way to do this.  My preferred method would be something like this:

<input type=submit name="deleteObject('A'):method" value="Delete">
<input type=submit name="deleteObject('B'):method" value="Delete">

Any ideas on how to make this work?  I know there are workarounds, but
the alternatives make for a sub-optimal user interface.

Thanks,

-- 
Michael S. Fischer / michael at dynamine.net / +1 650-533-4684
Lead Hacketeer, Dynamine Consulting, Silicon Valley, CA