[Catalyst] expand CGI::FormBuilder
Felix Antonius Wilhelm Ostmann
ostmann at websuche.de
Thu Jan 3 14:25:14 GMT 2008
OK, i tested a liddle bit with this and it works now ... only one more
thing:
in CGI::FormBuilder.pm
my $f = CGI::FormBuilder::Field->new($self, $args);
I cant change the class for the fields, couse it is hardcoded. Currently
i dont need it, but want to told it and say thanks :)
Juan Camacho schrieb:
> On Nov 23, 2007 4:04 AM, Jonathan Rockway <jon at jrock.us> wrote:
>
>
>> So what you need to do is do something like:
>>
>> package MyApp::FormBuilder::Action;
>> use base 'Catalyst::Controller::FormBuilder::Action::TT'; # or Mason etc.
>> sub _create_formbuilder { shift; return MyApp::FormBuilder->new(@_) }
>> 1;
>>
>> Then configure Catalyst::Controller::FormBuilder to use it:
>>
>> $config->{Controller::FormBuilder}{action} = 'MyApp::FormBuilder::Action';
>>
>> That should do it. This is totally untested though, so good luck.
>>
>>
>
> Yep, that should do it although _create_formbuilder is private and
> undocumented :) Also, I haven't documented the C::C::F::Action class
> or the 'action' config parameter mostly because I'm not sure I am
> going to keep the Action implementation around. I use C::C::F::Action
> subclasses in my own applications, so I *probably* will.
>
> Matt's suggestion is good and makes the above unnecessary for this
> case. Simply add support for
> $config->{Controller::FormBuilder}{formbuilder_class} =
> 'My::Own::FormBuilder'. This will help with the simple cases where
> you just want to swap CGI::FormBuilder with a subclass or an adapter
> pattern class instead.
>
> Juan
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
--
Mit freundlichen Grüßen
Felix Antonius Wilhelm Ostmann
--------------------------------------------------
Websuche Search Technology GmbH & Co. KG
Martinistraße 3 - D-49080 Osnabrück - Germany
Tel.: +49 541 40666-0 - Fax: +49 541 40666-22
Email: info at websuche.de - Website: www.websuche.de
--------------------------------------------------
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin: Websuche Search Technology
Verwaltungs GmbH - AG Osnabrück - HRB 200359
Geschäftsführer: Diplom Kaufmann Martin Steinkamp
--------------------------------------------------
More information about the Catalyst
mailing list