PDA

View Full Version : Problem with dirty variable



nnimmakayala
12 Dec 2011, 4:27 AM
i have a form with 10 fields.
in add mode i inserted fields in database.
in edit i changed only 2 fields in the form.
i want to pass only that 2 fields to database .
how to get that 2 fields ,other than all fields in the form.
how to achieve this using "Dirty" variable concept.
can u suggest me all possible ways to achieve this problem.

tobiu
12 Dec 2011, 5:35 AM
can u suggest me all possible ways to achieve this problem.


definitely not :)

if you are using an Ext.data.Model configured with a proxy in combination with your form, you can update the record and call record.save().

you can set this to false in your writer config:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.writer.Writer-cfg-writeAllFields