Client-side Events

Description

These are the Client-side events used with the UX component's List control's Detail View.

Name
Description
canUpdateList

Fires when the user tries to update the List with edits that have been made to the List Detail View. If function returns false, action is cancelled. The data object is passed in as a member of the e.object. If you set properties in e.data, you can override the values that the user entered.

hasClientSideValidationErrors

The 'hasClientSideValidationErrors' event fires when the user tries to save Detail View edits back to the List and one or more controls in the Detail View has a client-side validation error.

afterUpdateList

Fires after the user updates the List with edits that have been made to the List Detail View.

canSynchronizeList

Fires when the user tries to synchronize the data in the List (by making an Ajax callback). If the function returns false, the action is cancelled. The data object is passed in as a member of the e object. If you set properties in e.data, you can override the values from the List that will be submitted to the server. If you set the e.data[rowNumber]._isDirty property of a particular row to false, then the data in that row will not be synchronized. The e object that is passed in includes batchSize, totalDirtyRows, and startingRow. If all of the data is not being submitted in batches, then the batch size is 0. To test if this is the first batch in a job test for batchSize > 0 and startingRow = 1.

afterSynchronizeListBatch

If the List is being synchronized in batches, fires when a batch is completed. If the function returns false, the next batch (if any) will not be sent. The data in the e object that is passed in will allow you to create your own progress counter. The countObject parameter in the e object has statistics on the current batch (e.g. number of records with errors, etc.) To see all of the properties in e.countObject you can add this to your code: alert(JSON.stringify(e.countObject)).

canCancelBatch

If the List is being synchronized in batches, fires if the user clicks the 'Cancel' button to stop sending batches of records to the server to synchronize. If the function returns false, then the synchronization is not cancelled.

afterCancelBatch

If the List is being synchronized in batches, fires after the user has clicked the 'Cancel' button to stop sending batches of records to the server to synchronize.

afterSynchronizeList

Fires after the data in the List has been synchronized.

beforeSynchronizeListBatchStart

If the List is being synchronized in batches, fires before the first batch is submitted. The purpose of this event is to allow you to open a window or set focus to a panel where the synchronization progress will be shown.

afterSynchronizeListBatchEnd

If the List is being synchronized in batches, fires after the last batch has completed. A possible use case for this event is to allow you to close a window you might have opened to show the synchronization progress. The countObject parameter in the e object has statistics on the current batch (e.g. number of records with errors, etc.) To see all of the properties in e.countObject you can add this to your code: alert(JSON.stringify(e.countObject)).

afterRefreshListIncremental

Fires after an incremental List refresh completes.

canResetRow

Fires when the user tries to undo edits to a row of data in the List. If function returns false, action is cancelled.

canDeleteRow

Fires when the user tries to delete a row of data in the List. If function returns false, action is cancelled.

canUndoEdits

Fires when the user tries to undo edits to the List Detail View form. If function returns false, action is cancelled.

afterResetRow

Fires after the user has undone edits to a row of data in the List.

afterDeleteRow

Fires after the user has deleted a row in a List.

afterUndoEdits

Fires after the user has undone edits to the List Detail View.

canNewRecord

Fires when the user tries to go to a new Detail View record. If the function returns false, action is cancelled.

afterNewRecord

Fires after the new record has been displayed in the DetailView form.

beforeDetailViewPopulate Event

Fires after the user has selected a row in a List, but before the List's Detail View is populated.

afterDetailViewPopulate

Fires after the user has selected a row in a List and the List's Detail View has been populated.

afterListRowSelectCancelled

Detail View for the orderDetail List is in another Panel, this event can give focus to the Panel so that the user can save the dirty Detail View record.

modeChanged

Fires when the Detail View mode changes. The possible states of the 'mode' flag are: 'edit', 'enter' and 'search'.

beforeMediaFilesUploaded

Fires before any media files (photos, video, audio recordings) are uploaded to the server, or Amazon S3 when data are synchronized.

afterMediaFilesUploaded

Fires after all media files (photos, video, audio recordings) have been uploaded to the server, or Amazon S3 when data are synchronized.

onMediaFilesUploadErrors

Fires if there were any errors when uploading media files.

onNoMediaFilesToFetch

Fires when there are no media files to download.

beforeMediaFilesDownloaded

Fires before media files are downloaded.

afterMediaFilesDownloaded

Fires after media files have been downloaded.

beforeDeleteOrphanMediaFiles

Fires before any orphaned media files are deleted from the local file system on the device.

afterDeleteOrphanMediaFiles

Fires after orphaned media files have been deleted.