[Catalyst] HTML::Widget troubles; $result methods return empty
Randall Hansen
randall at raan.net
Sat Jan 14 23:07:00 CET 2006
Advice on IRC was to dump Plugin::Fillinform in favor of HTML::Widget.
I'm trying to use it, but so far I've not been able to get any $result
methods to return anything.
Here's my code. It's a minimal example, but from reading the docs it
seems like it should work:
$c->widget->element( 'Textfield', 'firstname' );
$c->widget->constraint( 'All', 'firstname' );
my $result = $c->widget->process;
After this, any method I call on $result (e.g. $result->params)
returns undef or an empty data structure. I know that 'firstname' is
coming in as a parameter because $c->req->param( 'firstname' ) returns
it.
Sebastian's example contains:
> my $result = $c->widget('foo')->process($query);
But none of the docs indicate where $query should come from. I've
tried $c->req, but that doesn't work.
I also tried:
my $result = $c->widget_result;
On IRC Sebastian suggested that I use "indicator," but I have no idea
what that does. The docs don't help, and there's no mention of it in
the list archives.
In short, I'm a little lost. I'm willing to admit that I'm doing
something wrong, I just don't know what. Any help appreciated.
Randall
More information about the Catalyst
mailing list