Announcement

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

    Sharing DataSource

    Hi,

    I have a ListGrid that allows new records to be created via startEditingNew().

    When the user fills out the available fields, the "editComplete" event triggers a new window to be shown, which contains a DynamicForm to allow them to edit additional data.

    (In the editComplete, I'm checking oldValues ... if null then I know it's a new record, so I need to show the DynamicForm).

    Both of these widgets share the same RestDataSource.

    The problem is that the "add" function in the back-end REST for this datasource takes a while to complete, since it needs to create a lot of other records in other tables.

    So when the "editComplete" event fires on the ListGrid, the add response has not been returned yet when the DynamicForm pulls it up to be edited.

    Consequently, when the user clicks "Save" on the DynamicForm, a duplicate record is created. (At least I suspect that's what's going on).

    Hopefully I explained that well enough. I was wondering if there's a way I can wait for the REST add response as a way to delay the appearance of the DynamicForm. Preferably with a "please wait" message shown to the user.

    Thanks,
    Mike






    SmartClient Version: SC_SNAPSHOT-2011-01-06/LGPL Deployment (built 2011-01-06)
Working...
X