-
6 Sep 2009 4:16 PM #21
Hi Animal,
This issue doesn't seem to have been fixed as of now. I have to use the workaround to get the submit to work even though I've set standardSubmit to true in the Ext.form.BasicForm object which wraps an existing form tag in the html page.Shameless BUMP!
When is this ancient bug with a very simple fix going to be fixed? The bug was reported in 2.1 and got sent out in 2.2!
People are still being bitten by this when using standardSubmit: true
I wonder when this would be fixed.
Thanks.
Codaholic
-
23 Oct 2009 5:15 AM #22
The hell ! This is still foobar in the latest 3.x ?!? Does the bug need opening there as well ?
-
24 Oct 2009 11:38 AM #23
This was fixed in rev 4924 for 3.x branch (released with 3.0.1)
MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
25 Oct 2009 2:58 AM #24
But what about using the configured URL in the regular Ext.Action.Submit?
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
25 Oct 2009 5:38 AM #25
Not sure what your point is, the code in svn looks something like below:
Code:submit : function(options){ if(this.standardSubmit){ var v = this.isValid(); if(v){ var el = this.el.dom; if(this.url && Ext.isEmpty(el.action)){ el.action = this.url; } el.submit(); } return v; } ... },MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
25 Oct 2009 1:07 PM #26
Yes, that uses the configured URL if standardSubmit is specified.
If using a default Ajax submit through the default Ext.form.Action.Submit method, then the configured URL is not used, but must be passed to the submit call.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
25 Oct 2009 4:29 PM #27
The modified xml form example below went to dude.php when I tested it. On a side point, the validation errors do not show, but I posted a separate ticket for that problem already.
Code:/*! * Ext JS Library 3.0+ * Copyright(c) 2006-2009 Ext JS, LLC * licensing@extjs.com * http://www.extjs.com/license */ Ext.onReady(function(){ Ext.QuickTips.init(); // turn on validation errors beside the field globally Ext.form.Field.prototype.msgTarget = 'side'; var fs = new Ext.FormPanel({ url: 'dude.php', frame: true, title:'XML Form', labelAlign: 'right', labelWidth: 85, width:340, waitMsgTarget: true, // configure how to read the XML Data reader : new Ext.data.XmlReader({ record : 'contact', success: '@success' }, [ {name: 'first', mapping:'name/first'}, // custom mapping {name: 'last', mapping:'name/last'}, 'company', 'email', 'state', {name: 'dob', type:'date', dateFormat:'m/d/Y'} // custom data types ]), // reusable eror reader class defined at the end of this file errorReader: new Ext.form.XmlErrorReader(), items: [ new Ext.form.FieldSet({ title: 'Contact Information', autoHeight: true, defaultType: 'textfield', items: [{ fieldLabel: 'First Name', name: 'first', width:190 }, { fieldLabel: 'Last Name', name: 'last', width:190 }, { fieldLabel: 'Company', name: 'company', width:190 }, { fieldLabel: 'Email', name: 'email', vtype:'email', width:190 }, new Ext.form.ComboBox({ fieldLabel: 'State', hiddenName:'state', store: new Ext.data.ArrayStore({ fields: ['abbr', 'state'], data : Ext.exampledata.states // from states.js }), valueField:'abbr', displayField:'state', typeAhead: true, mode: 'local', triggerAction: 'all', emptyText:'Select a state...', selectOnFocus:true, width:190 }), new Ext.form.DateField({ fieldLabel: 'Date of Birth', name: 'dob', width:190, allowBlank:false }) ] }) ] }); // simple button add fs.addButton('Load', function(){ fs.getForm().load({url:'xml-form.xml', waitMsg:'Loading'}); }); // explicit add var submit = fs.addButton({ text: 'Submit', disabled:true, handler: function(){ fs.getForm().submit({ // url:'xml-errors.xml', waitMsg:'Saving Data...' }); } }); fs.render('form-ct'); fs.on({ actioncomplete: function(form, action){ if(action.type == 'load'){ submit.enable(); } } }); }); // A reusable error reader class for XML forms Ext.form.XmlErrorReader = function(){ Ext.form.XmlErrorReader.superclass.constructor.call(this, { record : 'field', success: '@success' }, [ 'id', 'msg' ] ); }; Ext.extend(Ext.form.XmlErrorReader, Ext.data.XmlReader);MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow
-
26 Oct 2009 1:08 AM #28
Yes, it does work, so I think this ticket can be closed. Buried down in the Action class is
Code:getUrl : function(appendParams){ var url = this.options.url || this.form.url || this.form.el.dom.action; if(appendParams){ var p = this.getParams(); if(p){ url = Ext.urlAppend(url, p); } } return url; },Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
26 Oct 2009 1:13 AM #29
Still doesn't give a good experience though, as it's busted in the current public release.


Reply With Quote