[jifty-devel] Jifty::action behavior
Nelson Elhage
nelhage at MIT.EDU
Wed Jun 28 11:56:27 EDT 2006
Hey all,
I've been planning to write up some Jifty::Action documentation,
including a ``Why the **** isn't my action getting run?''
troubleshooting guide, in order to document some of the gotchas I've
run into.
After reading source and playing around with actions a little, I've
arrived at the following summary of behaviours with registration and
arguments:
If I have an action created by
my $action = Jifty->web->new_action(class => 'Foo',
moniker => 'do_foo',
arguments => { bar => 1, baz =>
'quux'});
$action->button(...) *will* register the action with the form, but
Jifty->web->link(submit => $action) alone will not
Furthermore, assuming that C<bar> is a C<constructor> argument, and
baz isn't, C<bar> will be automatically submitted by the action
registration, but C<baz> will be essentially ignored for the purposes
of generating HTML?
Are both these statements correct, and, if so, is this really the
desired behaviour? I know I found both of these to be a bit
counterintuitive. I'd like to figure this out, and then document as
appropriate.
Thanks for the help,
- Nelson Elhage
More information about the jifty-devel
mailing list