On 1/29/07, Marc Logghe <[EMAIL PROTECTED]> wrote:
Actually, the docs give a TT example:
[% FormBuilder.render %]
And therefore in TT it is not clear whether it is a variable or a
package name. Anyways, I tried it with the package name in Mason as well
(FormBuilder->render, Catalyst::Controller::FormBuilder->render, ....):
nope. 99% sure in the TT example 'FormBuilder' is a variable, not a
package name.
It seems to work only when I do the assignment in the controller:
$c->stash->{form} = $self->form;

In Mason template:
<% $form->render %>

No magic...

by default C-C-FormBuilder does the equivalent of this:

  $c->stash->{FormBuilder} = CGI::FormBuilder->new(\%attr)

If instead you want it to be $c->stash->{form} set obj_name config variable:

obj_name:
   Not applicable for HTML::Template view. By default, it is
FormBuilder. e.g. $c->stash->{FormBuilder} = $formbuilder.

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to