[Zope] two submit buttons/ one method
Florent Guillaume
fg@nuxeo.com
Mon, 13 May 2002 18:46:23 +0000 (UTC)
Ok there are basically two ways.
The one I use in most cases:
<form action="some_func">
...
<input type="submit" name="submit1" value="Button 1">
<input type="submit" name="submit2" value="Button 2">
</form>
and check which of "submit1" or "submit2" variables exist to distinguish
the buttons.
Or use :method with two different methods:
some_func.py
##parameters=..., isbutton2=0
... processing here ...
some_other_func.py:
##parameters=...
context.some_func(..., isbutton2=1)
Florent
John Hunter <jdhunter@ace.bsd.uchicago.edu> wrote:
> >>>>> "Florent" == Florent Guillaume <fg@nuxeo.com> writes:
>
> Florent> Please don't do that. It's a maintenance nightmare, an
> Florent> internationalization nightmare, and an ugly design to
> Florent> boot. Use the :method idiom, it's designed to that.
>
> Right, but unless I'm missing something, the method idiom is used to
> call different methods. If you saw the original post, I want to call
> the same method with different values for a given variable. Can you
> do this with :method?
>
> Thanks,
> John Hunter
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com