View Full Version : I want to submit only dirty field values.
ss.sureez
12 Jan 2012, 1:54 AM
Hi,
I am using Extjs 4.0.2a. While updating i want to submit only dirty field values to server. I am not able to find a property to submit only dirty fields.
Only in getvalues() we have a option to get dirty values.
As per my knowledge we can use getvalues() method to getvalue of the form and do ajax request to sent data. Can i able to do form submit to send only dirty values
Please help me how to do it.
thanks,
suresh kumar
:s
Have you tried using getFieldValues() instead?
mitchellsimoens
12 Jan 2012, 9:47 AM
Or just pass true as the 2nd argument of getValues
ss.sureez
12 Jan 2012, 11:07 AM
I know about getValues can return dirty field values.
I doing form submit, How can i send dirty values alone. Do i need to get the values and sent data with params property.
One more question. How Extjs sending form values sent to server, Is that using getvalues at the background, if that is true can we able to pass dirty as true for getvalues() method?
thanks,
suresh kumar
mitchellsimoens
12 Jan 2012, 11:27 AM
You can create your own submit action or override the default one:
getParams: function() {
var nope = false,
configParams = this.callParent(),
fieldParams = this.form.getValues(nope, nope, this.submitEmptyText !== nope);
return Ext.apply({}, fieldParams, configParams);
},
You can see that it uses getValues and you could override this method very easily
ss.sureez
13 Jan 2012, 8:11 AM
Thanks mitchellsimoens (http://www.sencha.com/forum/member.php?22216-mitchellsimoens).
:)
Diavololt
10 Oct 2012, 1:44 AM
It must be config on Ext.form.Action.Submit, like 'submitOnlyDirty' defaults to false
and like 'resetDirty' defaults to false, after submit to reset dirty fields.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.