Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DSResponse error status and custom error handling for optimistic locking scenarios

    Hi Isomorphic,

    We are using Smart Client v8.3p_2013-07-18/Pro Deployment. We have a ListGrid that is hooked to a custom datasource that has one field 'Status' as an editable drop-down. We want to deal with Optimistic locking when updating the field value in our DAO and custom Data source. We have been reading the error handling documentation. By default, if there is an optimistic locking situation when editing this field, we can throw an error status as part of the DSResponse but by default, since this is an unrecoverable errors, just a error message pops up but row is not updated with the latest data passed into DSResponse. It looks like we would need to use custom error handling in JS to bypass just showing the default error message popup.

    How would we get the Status column for that record to show the newly updated value from the DB and how would we show the default red error icon (similar to validation errors) in the Status column?

    Any tips/suggestions would be appreciated.

    Thanks.

    #2
    Generally speaking when a conflict is detected you don't want to *automatically* wipe out the client-side record and the user's changes. You want to show a dialog allowing the user to keep or discard their changes. This wiki article shows an example of how you could handle this.

    Comment

    Working...
    X