ui.data.ActiveDictionary
A dictionary-like container for data for use in UI components.
When a property of a ui.data.ActiveDictionary (e.g. myButton.style()) is updated, the component it belongs to is automatically updated. For example, myButton.style().set('color', 'red') would change the color of button's text to red.
Usage | Returns |
---|
ui.data.ActiveDictionary(object, allowedProperties) | ui.data.ActiveDictionary |
Argument | Type | Details |
---|
object | Object, optional | A JavaScript object with properties and values to initialize this object with. |
allowedProperties | List, optional | An array of allowed properties for this object. If undefined, then any property is allowed. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["ui.data.ActiveDictionary is a container for storing data used by UI components, similar to a dictionary."],["Changes to an ActiveDictionary's properties automatically update the associated UI component, ensuring data and UI stay in sync."],["You can create an ActiveDictionary using `ui.data.ActiveDictionary(object, allowedProperties)` and optionally provide initial data and allowed properties."]]],[]]