[Catalyst] Using C::C::FormBuilder With DBIC
hkclark at gmail.com
hkclark at gmail.com
Sun Feb 18 09:25:34 GMT 2007
Hi Everyone,
I have been experimenting with Catalyst::Controller::FormBuilder. I'm
trying to provide an edit form for objects read from and written to the DB
via DBIx::Class. Have FormBuilder automatically load the data from DBIC
into the form seems pretty easy with something like:
my $widget =3D $c->model('MyAppDB::Widget')->find($id);
my $form =3D $self->formbuilder;
$form->values($widget->get_columns);
However, an elegant way of writing the data back out is not jumping out at
me. I know I could manually copy each field out of the $form object to my
$widget object, but it seems like there should be simple way to do it all in
one line like I got with the "$form->values($widget->get_columns);" above.
Any suggestions? What are other folks doing for C::C::FormBuilder and DBIC?
Thanks,
Kennedy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070218/60335=
2ee/attachment.htm
More information about the Catalyst
mailing list