Featured post
Extjs. Can't catch write event after store.save() with create action -
i'm trying handle event after creating new record extjs store , saving server. have problem - write event firing after update action. documentation says:
@event write fires if server returns 200 after ext.data.api.actions crud action. success of action determined in result['successproperty']property (note restful stores, simple 20x response sufficient actions "destroy" , "update". "create" action should should return 200 along database pk).
now i've such response server: [{"tid": 5, "action": "citygrid", "type": "rpc", "method": "create", "result": {"msg": "saved", "data": {}, }}]
i guess adding database.pk of created object server response should resolve problem i've no idea how it. i've tried ... "data": {"id":my_object.id}
no effect.
this example: http://dev.sencha.com/deploy/dev/examples/writer/writer.html creating return this:
{ "success":true, "message":"created record", "data": {"first":"sdfds","last":"sdfsdf","email":"asd@sdfs.sd","id":10} }
so return store record new object in reader.root property.
- Get link
- X
- Other Apps
Comments
Post a Comment