applyViewPreset
Applies the provided preset properties to this object.
applyViewPreset(preset: {}): voidSummary
This method is called from the constructor of preset view classes, e.g. the result of ui.label(...) and ViewComposite.withPreset(). The provided object may contain property values, bindings, and event specifiers.
Property values — These are set directly on the view object. Each property is set to the corresponding value.
Bindings — These are applied on properties the view object. Each property may be bound using an instance of the Binding class (i.e. the result of bound() functions), creating the target property and taking effect immediately.
Events — Events can be handled in two ways, depending on the value of the on... property:
onClick: "RemoveItem"— this interceptsClickevents and emitsRemoveItemevents instead. The ManagedEvent.inner property is set to the originalClickevent.onClick: "+RemoveItem"— this interceptsClickevents and emits both the originalClickevent as well as a newRemoveItemevent. The ManagedEvent.inner property of the second event refers to the originalClickevent.
Note
This method is called automatically. Do not call this method after constructing a view object.
Related
- class View abstractAn abstract class that represents a view.
