PDA

View Full Version : Add record to store fails to save remotely



[Daniel]
17 Nov 2010, 1:43 AM
Hi everyone,

I got a weird problem.. I'm using a grid panel with a json store and httpwriter.
When I add a record to the store - without calling store.reload - the new data appears in the grid but the data sent to the server is empty.



// Ensure record first!
if(this.ownerCt.ownerCt.record == null)
{
var clientWindow = this.ownerCt.ownerCt;
clientWindow.record = new store.recordType();
}

// Some lines in which the record is filled...

store.add([this.ownerCt.ownerCt.record]);
store.reload();
After some debugging, I can say that the record contains data when it is added to the store and everything is fine - except the create-http-request:


http://localhost/index.php/data/create
Parameterapplication/x-www-form-urlencoded
data{}Thanks in advance for your help.

[Daniel]
17 Nov 2010, 2:34 AM
I just realized that this only happens if the store is empty.
If it cotains at least one row, it works :confused: