Hello, I'm using a databound calendar using a GwtRPCDatasource as backend. When I delete an event, I get only the event identifier in the record that I receive (with request.getData()) but in the server I need more information in order to identify the data that I need to remove. This data is in the rest of the record fields so I try to get it with
but I'm getting null, while this same code works fine when I'm updating an element. According to the SmartClient documentation, in the DSRequest page, it says for oldValues field:
"For an update or remove operation, the original values of the record to be updated or removed. oldValues is automatically added to DSRequests submitted by DataBound Components. Available on the server via DSRequest.getOldValues().
The server can compare the oldValues to the most recent stored values in order to detect that the user was looking at stale values when the user submitted changes (NOTE: this means of detecting concurrent edit is sometimes called "optimistic concurrency" or "long transactions").
In applications where a policy of "last update wins" is not appropriate when updating certain fields, special UI can be shown for this case. For example, on detecting concurrent edit, the server may send back a special dsResponse.status code that the client application detects, offering the user a choice of proceeding with the operation, discarding edits, or reconciling new and old values in a special interface."
So, according to the documentation, oldValues is supposed to contain the complete record for the update and remove operation, but it's not the case for remove.
Is there any other way to access the record that is being removed?
Code:
request.getAttributeAsJavaScriptObject("oldValues");
"For an update or remove operation, the original values of the record to be updated or removed. oldValues is automatically added to DSRequests submitted by DataBound Components. Available on the server via DSRequest.getOldValues().
The server can compare the oldValues to the most recent stored values in order to detect that the user was looking at stale values when the user submitted changes (NOTE: this means of detecting concurrent edit is sometimes called "optimistic concurrency" or "long transactions").
In applications where a policy of "last update wins" is not appropriate when updating certain fields, special UI can be shown for this case. For example, on detecting concurrent edit, the server may send back a special dsResponse.status code that the client application detects, offering the user a choice of proceeding with the operation, discarding edits, or reconciling new and old values in a special interface."
So, according to the documentation, oldValues is supposed to contain the complete record for the update and remove operation, but it's not the case for remove.
Is there any other way to access the record that is being removed?
Comment