Class vq.utils.SyncDatasources
Constructs a utility object for use with multiple-source Ajax requests.
If data must be retrieved from several sources before a workflow may be started, this tool can be used to
check that all necessary data is available.
Defined in: vq.js.
Constructor Attributes | Constructor Name and Description |
---|---|
vq.utils.SyncDatasources(timeout, total, function, an, function)
|
Method Attributes | Method Name and Description |
---|---|
Initiates the data object poll.
|
Class Detail
vq.utils.SyncDatasources(timeout, total, function, an, function)
- Parameters:
- {integer} timeout
- number of milliseconds between checks for valid data. Defaults to 200ms.
- {total_checks} total
- number of checks to perform. Defaults to 20.
- {callback} function
- to call if all data is successfully found
- {args} an
- object containing the variables which will be assigned values by the Ajax responses.
- {args} function
- called if timeout reached without check object being filled.
Method Detail
start_poll()
Initiates the data object poll. After the maximum number of checks, a log is filed on the console and the object
aborts the polling operation.