PDA

View Full Version : [CLOSED] send object[] using DirectMethod



rbtceo
Jun 11, 2014, 6:28 AM
Hi All,

I am trying to send store changed data to server.

Server side: create panel grid toolbar item

var toolBarButton = new Ext.Net.Button("Save");
toolBarButton.OnClientClick = "var data=this.up().up().getStore().getModifiedRecords( ); #{DirectMethods}.SaveSubitems(data);";

Server side: try to get modified records

[DirectMethod]
public void SaveSubitems(object[] modifiedData)
{ }

Error: Uncaught RangeError: Maximum call stack size exceeded

Is there any way to get all modified records? If yes, please, provide an example.

Thank you.

Daniil
Jun 11, 2014, 2:33 PM
Hi @rbtceo,

A Store's getModifiedRecords method returns an array of modified records. A record is a complex object with cross references and it cannot be deserialized automatically. You should retrieve a record's data from each record. There is a Store's getChangedData method. It does a similar thing with all modified and new records.

rbtceo
Jun 12, 2014, 7:05 AM
Thank you.

The thread can be closed.