Load and save nested data in ExtJS 4

前端 未结 1 1485
误落风尘
误落风尘 2021-01-06 15:14

I have two models: Book belongsTo Author. Let\'s survey the author data sent together with book data on its way from server to ExtJs and back. Server sends following nested

相关标签:
1条回答
  • 2021-01-06 15:36

    Short Answer: No, not yet.

    Longer answer: You could create your own writer to handle your data structure and send it back to the server the same way as you received it.

    You could either create your own writer by subclassing: http://docs.sencha.com/ext-js/4-2/#!/api/Ext.data.writer.Writer and use that in your proxy

    or

    You could create a function on your model that changes it's structure. Since you are not using stores you could create a function saveModel() where you change the model structure and call the save() method.

    0 讨论(0)
提交回复
热议问题