[html-formfu] problems useing C::C::HTML::FormFu::ExtJS
Mario Minati
mario.minati at googlemail.com
Tue Mar 24 02:28:43 GMT 2009
A smiling hello to everyone :-)
I wasn't active on this list for the longest time and am happy that FormFu
evolved so well. Which wasn't actually a supprice, as Carl is very anxious,
as he always was. (Hi, Carl)
So I'll try to help as time and knowledge permits.
Actually I'm working with Catalyst, DBIC, ExtJS and FormFu.
I was happy to see the new ExtJS branch.
No back to development challenges:
When useing C::C::HTML::FormFu::ExtJS in a controller the resulting form
object was still of type HTML::FormFu.
This is probably due to the kind of perl reference magic in
Catalyst::Controller::HTML::FormFu:
*{"$args{form_method}"} = \&_form;
This always looks for _form in the current package
(Catalyst::Controller::HTML::FormFu), right?
Actually I see no obvious method to find out that there is another _form in
C::C::HTML::FormFu::ExtJS.
So I would extended C::C::HTML::FormFu::ExtJS with the following method:
sub _setup {
my ( $self, $app ) = @_;
# invoke original method
NEXT::_setup( @_ );
# get config
my $args = $self->_html_formfu_config();
# rewrite controller method
no strict 'refs';
*{$args->{form_method}} = \&_form;
}
An other possibility which would make the existence of
C::C::HTML::FormFu::ExtJS unnecessary is, to make the form class (usually
HTML::Form) configurable.
So I'm happy to read your answers.
Greets,
Mario Minati
More information about the HTML-FormFu
mailing list