[Catalyst] Form processing with catalyst, html::widget, and template toolkit

Will Hawes info at whawes.co.uk
Fri Jan 27 18:25:09 CET 2006


Matt S Trout wrote:
> On Fri, Jan 27, 2006 at 05:50:03PM +0100, Thomas Klausner wrote:
>> This is working quite fine, but I have to manually create a DBIC-object,
>> because DBIx::Class::WebForm cannot handle HTML::Widget objects
> 
> WebForm originated as a quick hack I did of CDBI::AsForm and FromForm onto
> DBIC to get http://trout.me.uk/perl/kf.tgz to work; it was never really
> intended to be a long-term solution. Have a look at FormTools, which is
> a newer attempt and rather more flexible.
>  
>> The real problems (currently) start when you want to load DBIC-objects
>> into HTML::Widget. There's currently no code on CPAN that does this.
>> Here's a very crude workaround that probably only works for text(area)
>> fields:
>>  foreach my $element ( @{ $w->{_elements} } ) {
>>    my $name=$element->name;
>>    next unless $item->can($name);
>>    $element->value($item->$name);
>>  }
>> 			     
>> I'm currently thinking of a design for something like
>> DBIx::Class::WebForm or Class::DBI::FromCGI that works with HTML:Widget
>> and DBIx::Class.
>>
>> If other people are interested, let me know. I'll probably post some
>> design ponderings soon here and on the DBIx::Class list.
>
> Yes yes yes yes yes yes yes yes yes :)
>

Another yes, please.



More information about the Catalyst mailing list