[Catalyst] HTML::Widget field name translation in MoreFewer?

Carl Franks fireartist at gmail.com
Sun Apr 30 10:16:56 CEST 2006


Simon,

I'm forwarding this message to the Catalyst mailing list, as I'm on
holiday for a few days, and don't have time to read it properly.
The original author of HTML::Widget, and several other contributors,
are subscribed to the list, so hopefully someone will be able to help
you sooner than I can.

To the mailing list,
Original Message Follows...

Carl,

I've written a Catalyst controller class called MoreFewer (for
displaying multiple rows of child data, eg, authors of a book). I'm
trying to use HTML::Widget there, and I've realized that it's not quite
sufficient for what I need. A field called 'author_last_name_3' should
use the method 'last_name' to read its value from the data object, so
the field names are not the same as the widget names.

I can almost do it with custom filters, but I can't pass them parameters
during their creation. Since each filter has to be using a different
index, I can't just use a generic class. I'd like to be able to
initialize a filter with a coderef.

Can you give me some advice on the best way of accomplishing this in
HTML::Widget?

Thanks,
Simon

--

Simon (Vsevolod ILyushchenko)   simonf at cshl.edu
                               http://www.simonf.com

"Think like a man of action, act like a man of thought."

                        Henri Bergson



More information about the Catalyst mailing list