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

Matt S Trout dbix-class at trout.me.uk
Fri Jan 27 18:14:40 CET 2006


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 :)

Been trying to get to this for some time, but suffering a lack of tuits.

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list