CatalystX-ExtJS-REST
view release on metacpan or search on metacpan
lib/CatalystX/Controller/ExtJS/REST.pm view on Meta::CPAN
}
if ( ref $file ) {
$c->log->debug( 'Loading form ' . $file ) if ( $c->debug );
my $config = $self->load_config_file($file);
$form->populate($config);
}
# To allow your form validation packages, etc, access to the catalyst
# context, a weakened reference of the context is copied into the form's
# stash.
my $context_stash = $self->_extjs_config->{context_stash};
$form->stash->{$context_stash} = $c;
Scalar::Util::weaken( $form->stash->{$context_stash} );
return $form;
}
sub load_config_file {
my ($self, $file) = @_;
my $config;
unless($config = $self->form_config_cache->{$file . ""}) {
die "Neither __PACKAGE__->config->{forms} nor " . $file . " exist."
unless(-e $file);
$config = Config::Any->load_files( {
lib/CatalystX/Controller/ExtJS/REST.pm view on Meta::CPAN
C<extjs_rest_user>.
=head2 root_property
Set the root property used by L</list>, update and create which will contain the data.
Defaults to C<data>.
=head2 context_stash
To allow your form validation packages, etc, access to the catalyst context,
a weakened reference of the context is copied into the form's stash.
$form->stash->{context};
This setting allows you to change the key name used in the form stash.
Default value: C<context>
=head2 form_base_path
Defaults to C<root/forms>
( run in 0.705 second using v1.01-cache-2.11-cpan-65fba6d93b7 )