-
-
15 Jan 2014 01:00:19 UTC
- Distribution: CatalystX-ExtJS-Direct
- Module version: v2.1.5
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (2)
- Testers (187 / 413 / 0)
- Kwalitee
Bus factor: 0- % Coverage
- License: bsd
- Activity
24 month- Tools
- Download (18.34KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
CatalystX::ExtJS::Direct - Enable Ext.Direct in Catalyst controllers
VERSION
version 2.1.5
SYNOPSIS
package MyApp::Controller::API; use Moose; extends 'CatalystX::Controller::ExtJS::Direct::API'; package MyApp::Controller::Calculator; use Moose; BEGIN { extends 'Catalyst::Controller' }; with 'CatalystX::Controller::ExtJS::Direct'; sub sum : Local : Direct : DirectArgs(1) { my ($self, $c) = @_; $c->res->body( $c->req->param('a') + $c->req->param('b') ); } 1;
In your web application:
// Load ExtJS classes here <script type="text/javascript" src="/api/src"></script> <script> Ext.Direct.addProvider(Ext.app.REMOTING_API); Calculator.sum({ a: 1, b: 2 }, function(result) { alert(result); }); </script>
DESCRIPTION
This module makes the transition to Ext.Direct dead simple.
Have a look at the tutorial which gives you a few examples on how to use this module.
CatalystX::Controller::ExtJS::Direct::API is responsible for providing the API to the ExtJS application. Some configuration can be done here.
SEE ALSO
- CatalystX::ExtJS
-
Parent namespace. Includes examples and the code for the tutorial.
- CatalystX::ExtJS::REST
-
Add feature-rich REST controllers to your application.
AUTHOR
Moritz Onken <onken@netcubed.de>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Moritz Onken.
This is free software, licensed under:
The (three-clause) BSD License
Module Install Instructions
To install CatalystX::ExtJS::Direct, copy and paste the appropriate command in to your terminal.
cpanm CatalystX::ExtJS::Direct
perl -MCPAN -e shell install CatalystX::ExtJS::Direct
For more information on module installation, please visit the detailed CPAN module installation guide.