On 2/12/07, Danny Warren <[EMAIL PROTECTED]> wrote:
It looks to me that forwarding from one "Form" action to another "Form"
action causes the FormBuilder data from the first action to be
overwritten.
Can you confirm this, or am I doing something wrong here? I am still
somewhat green with Catalyst, so I might be misunderstanding exactly how
forwards work. From reading the docs, I was under the impression that
two actions should not clobber each other upon forwarding (since
forwarded actions are processed inside an eval).
Each action will have it's own formbuilder object instance. After you
return from the forward to another form action, $self->formbuilder
will be a brand new FormBuilder object.
sub foo : Form('foo') {
my ($self, $c) = @_;
# $self->formbuilder is for foo form
$self->forward('bar');
# now $self->formbuilder is for bar form
}
sub bar : Form('bar') { ... }
Consequently, each action should do it's own thing with it's
FormBuilder object -- e.g. validate, add or change form fields). Not
sure what kind of problem you are having as a result of this since you
didn't provide sample Controller code.
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/