onListZones
Definition
onListZones is a host callback invoked
by DimensionIQWidget when the widget requires the complete list of
zones for a project and the host application must retrieve them from persistent storage.
The host application is responsible for using the provided
projectKey
to locate all stored DIQ_Zone
records for that
project.
Once processing is complete, please refer to the
onResponse
contract in the Widget Callback Introduction.
This callback ensures the widget and the host application remain synchronized by providing the current collection of zones for the requested project.
Function Signature
Function Signature
onListZones: (
projectKey: string,
onResponse: (result: DIQ_Result, zones: Array<DIQ_Zone> | null) => void
) => void;
Callback Parameters
projectKey
Type: string
Description: The unique
key
identifying the project whose zones should be retrieved.onResponse
Type:
Type:
(result: DIQ_Result, zones: Array<DIQ_Zone> | null) => voidDescription: Callback function that must be called by the host to complete the operation, and return an array of DIQ_Zone objects. If no zones exist, return an empty array.
Examples
onListZones