JsonWithAssociationsWriter.js (431B)
1 Ext.define("PartKeepr.JsonWithAssociations", { 2 extend: 'Ext.data.writer.Json', 3 alias: 'writer.jsonwithassociations', 4 5 /** 6 * @cfg {Array} associations Which associations to include. 7 */ 8 associations: [], 9 writeRecordId: false, 10 11 getRecordData: function (record) 12 { 13 var data = this.callParent(arguments); 14 15 Ext.apply(data, record.getAssociatedData()); 16 17 return data; 18 } 19 });