-
27 Dec 2012 1:17 PM #1
Unanswered: Ext Direct in Form API problem
Unanswered: Ext Direct in Form API problem
Hi,
Am I missing something or the Ext direct API is not implemented in the form yet? I developped a complete ExtJS 4.1 application using Ext direct API for all my Form and Grid using CRUD in the grid and Load and Submit in the form.
For example :
This doesn't seems to work into sencha touch. Since I've create a formHandler for the function I want to call how can I call this function directly?Code:Ext.create('Ext.form.Panel', { api: { submit:Progik.direct['core.authentication'].login }, paramsAsHash: true .... });
I've tried to do this without any luck because the function configureFormRequest doesn't exist:
The only other way I'm currently thinking about is to use Ext.Ajax to call my Ext Direct Router with the correct parametters... Is there any other ways?Code:Progik.direct['core.authentication'].login(myform, function(response) { }, myscope);
Thanks
-
29 Dec 2012 7:17 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,085
- Vote Rating
- 453
- Answers
- 3153
Is this question for Ext JS 4? This was posted in Sencha Touch 2 forum.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
29 Dec 2012 7:29 AM #3
This is for sencha touch 2.1, I'm just saying that it work in ExtJS but seems not to be implemented yet in sencha touch and looking for a solution to use it.
-
23 Jan 2013 3:48 AM #4
The same question is interesting for me too. There are any comments about this problem from sencha touch developers?
-
23 Jan 2013 5:23 AM #5
I manage to create my own little function to submit my form with ExtDirect in sencha touch:
Code:var directRouterUrl = "/direct-router"; var directSubmit = function(config) { var params = config.params || {}; var scope = config.scope || this; params.extTID = 1; params.extAction = config.action; params.extMethod = config.method; params.extType = 'rpc'; params.extUpload = false; Ext.Ajax.request({ url:directRouterUrl, params:params, method:'POST', callback:function(options, success, response) { if(success) { if(config.success) { var response = Ext.decode(response.responseText); Ext.Function.bind(config.success, scope)(response.result, options); } } else { if(config.failure) { Ext.Function.bind(config.failure, scope)(response, options); } } } }); }; // To use it just do this directSubmit({ action:'contact', method:'submit', params:myform.getValues(), success:function(result, options) { }, failure:function(result, options) { } });
-
1 Apr 2013 12:16 PM #6
I was under the distinct impression that Touch and ExtJS shared the same data package.


Reply With Quote