By default, a FormPanelin ExtJS 3.1.0 places form fields as application/x-www-form-urlencodedwhen you call the submit () function.
FormPanel
application/x-www-form-urlencoded
Is there any way to get it to publish JSON?
You can use getValues()to pull values ββand then Ext.encode()them, as well as manually Ext.Ajax.request({})with this data.
getValues()
Ext.encode()
Ext.Ajax.request({})
You probably want to expand Ext.form.Action.Submitto encode parameters as JSON, rather than encode them in the body.
Ext.form.Action.Submit
Ext.form.Action.Submit.run.
Ext.form.Action.Submit.run
:
Ext.override(Ext.form.Action.Submit, { run: function() { // Your code here } });
var formData = App.formPanel.getValues(false); Ext.net.DirectMethod.request({ url: '/Product/Save', params: formData, success: function(jsonResult){ } });
App.formPanel.submit();
a App.formPanel.url = '/Product/Save'
App.formPanel.url = '/Product/Save'
Source: https://habr.com/ru/post/1731362/More articles:Choosing the Next Link Using XPath - xmlΠΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ Π»ΠΈ Π°ΡΡΠ΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΈΡ ΠΌΠ΅ΠΆΠ΄Ρ ΡΠ΅ΠΊΡΠΈΠ΅ΠΉ PHP ΠΈ ΡΠ΅ΠΊΡΠΈΠ΅ΠΉ Rails ΡΠ°ΠΉΡΠ°? - authenticationVoIP over 3G on iPhone, what has changed in the SDK? - objective-cIn Django, my .session request does not transfer ... does anyone know why? - pythonZend Framework - Single Session across multiple (different) domains - sessionEmail format support: plain text or HTML? - emailCan I use Google compatible URLs on WSS 3.0? - seoWhat concept does .net use to create mobile software? - .netLink image in WPF? - c #linq to sql -get Π΄Π°Π½Π½ΡΠ΅ ΠΈΠ· ΡΠ°Π±Π»ΠΈΡΡ, ΡΠ²ΡΠ·Π°Π½Π½ΠΎΠΉ Ρ Π΄ΡΡΠ³ΠΎΠΉ - c#All Articles