Saturday, January 23, 2010

FormFu, DBIC, model_config and resultset.

I have found myself back in Catalyst development work. This wouldn't be such a bad think if I hadn't just spent a whole day trying to fix up a form to edit a 'many_to_many' relationship which is stored in my Schema.

I've been following this post which says it should be about as simple as it sounds. i.e. not as simple as Rails, but definitely doable with finite effort. So, FormFu syntax not withstanding, I following these instructions but ended up with some peculiar error talking about 'result_source'. I tried playing with 'nested_name', 'model_config' etc... I began to think about building my Select in the controller.

Finally, I discovered my error: I had not configured Controller::HTML::FormFu which is shown nicely in this post:

http://lists.scsys.co.uk/pipermail/html-formfu/2009-March/001932.html

That is a day of my life gone, but at least I will be able to rise from sleep tomorrow knowing that I can move onto doing some new development.

UPDATE: One additional comment to the post above from 2009-March. I found that I needed to use the many_to_many relationship as the nested_name, not the has_many as stated.

No comments: