ui.data.ActiveDictionary
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Ein wörterbuchähnlicher Container für Daten zur Verwendung in UI-Komponenten.
Wenn eine Eigenschaft eines ui.data.ActiveDictionary (z.B. myButton.style()) aktualisiert wird, wird die zugehörige Komponente automatisch aktualisiert. Mit „myButton.style().set('color', 'red')“ wird beispielsweise die Farbe des Schaltflächentexts in Rot geändert.
Nutzung | Ausgabe |
---|
ui.data.ActiveDictionary(object, allowedProperties) | ui.data.ActiveDictionary |
Argument | Typ | Details |
---|
object | Objekt, optional | Ein JavaScript-Objekt mit Eigenschaften und Werten, mit denen dieses Objekt initialisiert werden soll. |
allowedProperties | List<String>, optional | Ein Array mit zulässigen Attributen für dieses Objekt. Wenn nicht definiert, ist jede Property zulässig. |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-25 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-25 (UTC)."],[[["\u003cp\u003eui.data.ActiveDictionary is a container for storing data used by UI components, similar to a dictionary.\u003c/p\u003e\n"],["\u003cp\u003eChanges to an ActiveDictionary's properties automatically update the associated UI component, ensuring data and UI stay in sync.\u003c/p\u003e\n"],["\u003cp\u003eYou can create an ActiveDictionary using \u003ccode\u003eui.data.ActiveDictionary(object, allowedProperties)\u003c/code\u003e and optionally provide initial data and allowed properties.\u003c/p\u003e\n"]]],[],null,["# ui.data.ActiveDictionary\n\n\u003cbr /\u003e\n\nA dictionary-like container for data for use in UI components.\n\n\u003cbr /\u003e\n\nWhen 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.\n\n| Usage | Returns |\n|----------------------------------------------------------------|--------------------------|\n| `ui.data.ActiveDictionary(`*object* `, `*allowedProperties*`)` | ui.data.ActiveDictionary |\n\n| Argument | Type | Details |\n|---------------------|--------------------------|---------------------------------------------------------------------------------------------|\n| `object` | Object, optional | A JavaScript object with properties and values to initialize this object with. |\n| `allowedProperties` | List\\\u003cString\\\u003e, optional | An array of allowed properties for this object. If undefined, then any property is allowed. |"]]