PDA

View Full Version : How to use set function in Ext.data.Model?



chenzhaoplus
5 Apr 2012, 6:28 PM
hi,guys!
Is it right?


currentRec.set("embranchmentId", {
"1111"
});


Or how about this?


currentRec.set("embranchmentId","1111");


which one is right?if both of them are wrong,then how to use it?
thanks!

vietits
5 Apr 2012, 6:33 PM
The second one is correct. Your first one is syntax error at {"1111"}.
You can also use currentRec.set({'embranchmentId': '1111'})