[Catalyst] CatalystX::CRUD Storage Error

Amiri Barksdale amiribarksdale at gmail.com
Thu Jul 30 21:11:40 GMT 2009

On Tue, Jul 28, 2009 at 08:30:44AM -0500, Peter Karman wrote:
| I should clarify further. Your controller code:
|  has 'form' => (
| 	isa	=>	'ml2::Forms::CreatorForm',
| 	is	=>	'rw',
| 	default	=>	sub { ml2::Forms::CreatorForm->new },
|  );
| is moreorless what the base controller does. So by having that 'has'
| declaration, you break it. Try taking the 'has' declaration out and
| see if that works.

This definitely allowed my controller to pass validation. I think that
what I am getting hung up on more broadly is something you mentioned earlier:

On Tue, Jul 28, 2009 at 08:30:44AM -0500, Peter Karman wrote:
| Peter Karman wrote on 07/28/2009 07:51 AM:
| >Amiri Barksdale wrote on 7/27/09 8:46 PM:
| >>On Thu, Jul 16, 2009 at 11:33:38PM -0500, Peter Karman wrote:
| >>| Also, your controller inherits from the base CatalystX::CRUD::Controller, which
| >>| doesn't really *do* anything by default. I.e., you need a form handler to
| >>| serialize and validate your model. Look at CatalystX::CRUD::Controller::RHTMLO
| >>| for one example. Or consider writing a controller base class that adapts your
| >>| favorite form handler (HTML::FormFu or Form::Processor or ...).

This is what I am trying to do. I have been poring over the docs for
CatalystX::CRUD::Controller::RHTMLO, and looking at its source code, to
see whether I can figure out what adaptations to make to tie FormHandler
to C:X:CRUD. I am just unclear on the API I think.

Is this correct: To make a controller base class to use
HTML::FormHandler with C:X:CRUD, I can look at, for instance,
CatalystX::CRUD::Controller::RHTMLO, and just replicate its
functionality using Formhanlder stuff? I need subroutines named
form, field_names, all_form_errors, form_to_object, do_search, etc.,
because those are what CatalystX::CRUD::Controller expects?


More information about the Catalyst mailing list