I have a common order object with a header and multiple detail records. The header is displayed for editing in a set of forms on different tabs all managed by a ValuesManager. Existing details are shown on another tab in a ListGrid which allows the editor to do inline edits in the grid. When the user clicks save I need to save any pending edits they may have made in the detail grid and if those saves were successful I then need to save the header record.
Is there a recommended pattern to follow in this situation? ListGrid.saveAllEdits() supports a callback that "will be fired on a successful save." Does that mean the callback will only fire if all of the edited records were saved successfully? If any of them failed due to validation errors does the callback not get fired? How do I know if it is OK to continue with the save of the header?
Is there a recommended pattern to follow in this situation? ListGrid.saveAllEdits() supports a callback that "will be fired on a successful save." Does that mean the callback will only fire if all of the edited records were saved successfully? If any of them failed due to validation errors does the callback not get fired? How do I know if it is OK to continue with the save of the header?
Comment