-
21 Mar 2011 5:23 AM #1Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,678
- Vote Rating
- 435
[FIXED-EXTJSIV-198] DirectSubmit not sending data
[FIXED-EXTJSIV-198] DirectSubmit not sending data
I have checked this with the online form example
http://dev.sencha.com/deploy/ext-4.0...rect-form.html
If you press submit and look at the request, you will get this:
Code:{ "action": "Profile", "method": "updateBasicInfo", "data": [ undefined, null ], "type": "rpc", "tid": 5 }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.
-
21 Mar 2011 7:42 PM #2
Will be fixed in the next release.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
16 Feb 2012 5:59 AM #3
DirectSubmit with ExtJS 4.1 Beta 2
DirectSubmit with ExtJS 4.1 Beta 2
This error is happening for me in version extjs 4 beta 2.
I think I discovered part of the problem:
DirectSubmit.js:
It's tries send a form element but Connect.js don't detects it as a form upload:PHP Code:doSubmit: function() {
var me = this,
callback = Ext.Function.bind(me.onComplete, me),
formEl = me.buildForm();
me.form.api.submit(formEl, callback, me);
So, it tries to encode the form element like a simple json object but it can't do it, so I get undefined in data field:PHP Code:isFormUpload: function(options) {
var form = this.getForm(options);
if (form) {
return (options.isUpload || (/multipart\/form-data/i).test(form.getAttribute('enctype'))); } return false;
},
For now, I just changed me.buildForm() to me.getParams(). It's working fine because I don't need upload anything now, but it's just an workaround.PHP Code:{"action":"Site","method":"login","data":[undefined],"type":"rpc","tid":1}
Thanks
-
16 Feb 2012 6:16 AM #4
Just forget... My action didn't have the param formHandler...

It could be more clear in the DirectSubmit documentation. Thanks. All working now.
[]s
Victor
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[FIXED-EXTJSIV-212] Ext.data.Store.sync() does not update 'id' of phantom records
By madrabaz in forum Ext:BugsReplies: 5Last Post: 6 Apr 2012, 1:38 AM -
[FIXED-EXTJSIV-191] Component.js typos
By LesJ in forum Ext:BugsReplies: 1Last Post: 21 Mar 2011, 3:12 PM -
[FIXED-EXTJSIV-158] Dynamic Form, Grid and Charts example stall 1+ second
By SebTardif in forum Ext:BugsReplies: 1Last Post: 17 Mar 2011, 4:21 PM -
Sending data
By oasisjoel in forum Ext 2.x: Help & DiscussionReplies: 13Last Post: 3 May 2009, 6:08 PM -
Issue with sending data
By border9 in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 30 Oct 2008, 8:50 AM


Reply With Quote