UNPKG

apex4x

Version:

The Comprehensive ARIA Development Suite

41 lines 3.81 kB
�� Function: $A(objectParentDC, arrayOfKeyValueMapsToGenerate, objectKeyValueMapOverrides, boolDelayTilDocumentLoaded, boolDisableAsync) Description: generates a collection of new DC objects. Returns: DC Objects Array. Note: When objectParentDC is set with a preexisting DC object, the parent child property mappings specified within the DC API will automatically be populated. If omitted, the new DC objects will be considered the parents for that collection. The arrayKeyValueMap must consist of an array of DC object declarations. Unlike the toDC() function, which will generate an ID automatically if omitted, DC object declarations passed to $A() must include a unique ID for every DC object instance. After which, the getDC() function can be used to retrieve the DC object with the specified ID. Shared properties and methods can be set within objectKeyValueMapOverrides, which will be merged into all DC objects within the collection, but only if the property or method is not already specified within the individual declaration array. When DC.allowCascade is true, lifecycle methods such as beforeRender, afterRender, and so on as documented within the DC API, will be exicuted on the individual declarations, as well as on the shared overrides declaration in succession if present. All DC objects generated within the same array are registered as siblings. Example: // Syntax for creating a basic collection of associated DC objects. var dcObjectsArray = $A([ { id: "UniqueId1" }, { id: "UniqueId2" }, { id: "UniqueId3" } ]); // Syntax for creating a basic collection of associated DC objects, plus shared overrides. var dcObjectsArray = $A([ { id: "UniqueId1" }, { id: "UniqueId2" }, { id: "UniqueId3" } ], { // Shared DC API properties and methods to merge if not already declared individually. });