-
21 Mar 2012 10:24 AM #11
It works with Json writer and not with Xml
It works with Json writer and not with Xml
Thanks Blee. It worked with writer.Json. But it didn't work with writer.Xml. I have gone ahead with changing my server to accept JSON instead of XML. I would request Sencha developers to make it working for writer.Xml as well.
-
15 Apr 2012 7:57 AM #12
Or, in 4.1 use an override
Or, in 4.1 use an override
In 4.1 I achieved the same affect using an override
usage then is then simply the normal:Code:Ext.define('custom.JsonWriterOverride', { override: 'Ext.data.writer.Json', getRecordData: function(record) { Ext.apply(record.data,record.getAssociatedData()); return record.data; } });
Code:Ext.define('My.model.Query', { extend: 'Ext.data.Model', requires: ['custom.JsonWriterOverride'], ... proxy: { type: 'rest', url: 'webApp/query.do', reader: { type: 'json', root: 'data' }, writer: { type: 'json', writeAllFields: true } } });
-
30 Dec 2012 8:56 AM #13
Let me add something missing to pk69's solution that worked for me.
Although the nested store is inside the parent store calling the Definition.fieldDefinitions(); function.
This data is not stored inside the "Definition.fieldDefinitions" field.
So if you manually set the data for example
When calling the store.save() mehtod the writer will also send the nested dataCode:Definitions.set("fieldDefinitions",[{some raw data},{more raw data}]);
-
12 Apr 2013 12:35 AM #14
Hi blee
will your custom writer work with rest proxy as well?
has anyone tried the above solution with rest api
-
12 Apr 2013 1:20 AM #15
i dint see the post of beachdog

Hi beachdog,
Can you paste some detailed code as how you are sending nested JSON data back to server using rest proxy api?
Similar Threads
-
Loading tree data from local "nested store"
By mmix in forum Ext 3.x: Help & DiscussionReplies: 12Last Post: 24 Aug 2010, 1:39 PM -
[CLOSED-350]CheckboxGroup creates nested Panels instead of nested Containers.
By Animal in forum Ext 3.x: BugsReplies: 1Last Post: 13 Nov 2009, 12:22 PM -
Formfields wont show when in column nested in fieldset (nested in tab)
By exo in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 7 Jan 2009, 7:21 AM -
Form Layout + Nested Tab Panel + Nested BorderLayout
By pluesch0r in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 5 Feb 2008, 8:25 AM -
saving a nested tree
By notjoshing in forum Ext 1.x: Help & DiscussionReplies: 5Last Post: 16 Aug 2007, 5:36 AM


Reply With Quote