e;
BEGIN { extends 'Catalyst::Controller' };
with 'CatalystX::Controller::ExtJS::Direct';
use JSON::XS;
sub add : Chained('/') : Path : CaptureArgs(1) {
my($self,$c, $arg) = @_;
$c->stash->
->body( $c->stash->{add} + $arg );
}
sub echo : Local : Direct : DirectArgs(1) {
my ($self, $c) = @_;
$c->res->content_type('application/json');
$c->res->body(encode_json($c->req->data));
}
},
list => { Direct => undef, DirectArgs => 1 },
},
class => 'DBIC::User',
use_json_boolean => 1,
create_requires => [qw(email first last)],
return_object => 1,
);
before 'deseri
> 'root/static/images',
image_chooser_url => '/static/images'
}
);
# use a JSON view
# output is available at /images
1;
Example at L<http://www.extjs.com/deploy/dev/
/chooser.html>.
=head1 DESCRIPTION
This module generates an object which can be serialized to a json string. The ImageChooser class of ExtJS expects
the data in this way.
You can even look in subdi