I’m trying to do the update operation of GwtRPCDataSource
When I edit some column in the List Grid, the update is proper done in the server side, the Callback of the RPC in the executeUpdate runs the onSucess() method, and the returned updated object contains the correct (edited) values. Also, in the database, the record is correctly update.
Everything looks ok, except that the row with the edited record is removed from the ListGrid, just after the update is done on the server side and the callback returns.
Refreshing the page (and so calling again the fetch) the grid is fetched with the correct values (i.e, with the edited record updated)
@ceravolo Enable the ResultSet log category in the Developer Console and it will tell you why the record was removed. Most likely, it no longer matches the filter criteria currently applied to the grid.
@Isomorphic thanks for the tip (use the Developer Console)!
Actually the record wasn’t being removed from the grid, it was going to the last row position, hehe, I wasn’t seeing that.
Using the developer console, it shows a warning telling that the PK has changed after updating, witch actually didn’t happen (I do not change the PK)
The console shows the following log:
[“00:26:04.667:WARN:ResultSet:isc_ResultSet_15 (created by: isc_OID_3):Update operation - submitted record with primary key value[s]:{oid: 59} returned with modified primary key:{oid: 59}. This may indicate bad server logic. Updating cache to reflect new primary key.”]
The field “oid” is of type Integer, and as shown in the log, it was not changed. Why is the grid considering that it has changed?