When I update a record in my data source, I don't get to see the old values of the record on the server.
This is my code on the client:
This is my code on the server:
oldValues and newValues always contain the same thing. What's up with that? Shouldn't I see the old values in DSRequest.getOldValues()?
I'm using a nightly SmartGWT 2.5.
This is my code on the client:
Code:
Record newRecord = new Record(oldRecord.toMap()); // make a copy
newRecord.setAttribute("attribute", "new value");
myDataSource.updateData(newRecord);
Code:
class MyDataSource extends BasicDataSource {
/* ... stuff ... */
public DSResponse executeUpdate(DSRequest req) throws Exception {
final Map oldValues = req.getOldValues();
final Map newValues = req.getValues();
/* ... more stuff ... */
}
}
I'm using a nightly SmartGWT 2.5.