[Zope] That :method thingy.. where's it documented?
Evan Simpson
evan@4-am.com
Tue, 5 Sep 2000 14:39:03 -0400
From: Brad Clements <bkc@murkworks.com>
> Thanks but that's not really what I'm looking for.
>
> I thought there was a type ":method" that could be used as a way to
> call a method..
>
> Perhaps I'm just going crazy.
No, you're right, and the page Rik referenced really should be updated to
include it. If "foo:method" is included in a form (usually by making it the
name of a submit button, or an option in a pick list) then "foo" is
effectively added to the end of the URL path. There is also
":default_method", the value of which is used if no ":method" is specified.
So:
<form action="act">
<input type="text" name="foo">
<input type="hidden" name=":default_method" value="def">
<input type="submit" name="m1:method" value="1">
<input type="submit" name="m2:method" value="2">
</form>
...will invoke "act/m1" or "act/m2" depending on whether you push button "1"
or "2", or "act/def" if you push the enter key (thereby submitting the form
without pressing either button).
Cheers,
Evan @ digicool & 4-am