Abstract static utility class to access ManagedObjects
and XMLNodes
that represent ManagedObjects
in a harmonized way.
The class mirrors the ManagedObject
API so that code that needs to work with ManagedObjects
in several representations can be written in a harmonized way. The slight differences are handled by specifying a super set of parameters that might not be needed in all use cases. For example sap.ui.fl
uses this class and its subtypes for change handlers that can be applied on XMLViews
and normal ManagedObject
instances.
Node | Description |
---|
Gets the "sap.ui.fl" namespaced special settings in the custom data.
The method is not to be used directly, but to be implemented by modifiers
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
See sap.ui.base.ManagedObject#applySettings method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
mSettings | object |
Further settings or properties for the control |
Attaches event on the specified ManagedObject
.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sEventName | string |
Event name |
|
sFunctionPath | string |
Absolute path to a function |
|
vData | object |
Predefined values for event handler function |
See sap.ui.base.ManagedObject#bindAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sAggregationName | string |
Aggregation name |
|
vBindingInfos | object |
Binding info |
See sap.ui.base.ManagedObject#bindProperty method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
|
vBindingInfos | object |
Binding info |
Function determining the control targeted by the change.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelector | object |
Target of a flexibility change |
|
id | string |
ID of the control targeted by the change. (name or id property is mandatory for selector) |
|
isLocalId | boolean |
|
|
oAppComponent | sap.ui.core.UIComponent |
Application component |
|
oView | Element |
For XML processing only: XML node of the view |
Function determining the control targeted by the change. It is also possible to pass an extensionpoint selector. In this case an extension point is referenced in the selector but the parent control of the extensionpoint will be returned.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelector | object |
Target of a flexibility change |
|
id | string |
ID of the control targeted by the change. (name or id property is mandatory for selector) |
|
isLocalId | boolean |
|
|
name | string |
Name of the extension point targeted by the change. (name or id property is mandatory for selector) |
|
oAppComponent | sap.ui.core.UIComponent |
Application component |
|
oView | Element |
For XML processing only: XML node of the view |
Function determining the control targeted by the change.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelector | object |
Target of a flexibility change |
|
id | string |
ID of the control targeted by the change. (name or id property is mandatory for selector) |
|
isLocalId | boolean |
|
|
name | string |
Name of the extension point targeted by the change. (name or id property is mandatory for selector) |
|
oAppComponent | sap.ui.core.UIComponent |
Application component |
|
oView | Element |
For XML processing only: XML node of the view |
Checks if the control ID is generated or maintained by the application.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.core.Control string |
Control instance or ID |
|
oAppComponent | sap.ui.core.Component |
|
Creates the control in the corresponding representation.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Class name for the control (for example, |
|
oAppComponent | sap.ui.core.UIComponent |
Needed to calculate the correct ID in case you provide an ID |
|
oView | Element |
XML node of the view, required for XML case to create nodes and to find elements |
|
oSelector | object |
Selector to calculate the ID for the control that is created |
|
id | string |
Control ID targeted by the change |
|
isLocalId | boolean |
|
|
mSettings | object |
Further settings or properties for the control that is created |
Cleans up the resources associated with this object and all its aggregated children. See sap.ui.base.ManagedObject#destroy method.
After an object has been destroyed, it can no longer be used! Applications should call this method if they don't need the object any longer.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
bSuppressInvalidate | boolean |
if true, this ManagedObject is not marked as changed |
Detaches event from the specified ManagedObject.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sEventName | string |
Event name |
|
sFunctionPath | string |
Absolute path to a function |
Finds the index of the control in its parent aggregation.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
See sap.ui.base.ManagedObject#getAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control which has the aggregation |
|
sName | string |
Aggregation name |
See sap.ui.base.ManagedObjectMetadata#getAllAggregations method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
See sap.ui.base.ManagedObject#getAssociation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control which has the association |
|
sName | string |
Association name |
Gets the binding template from an aggregation. See sap.ui.base.ManagedObject#getBindingInfo method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sAggregationName | string |
Aggregation name |
Returns the module path of an instance specific change handler.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
Function determining the control ID from the selector.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelector | object |
Target of a flexiblity change |
|
id | string |
ID of the control targeted by the change |
|
isLocalId | boolean |
|
|
oAppComponent | sap.ui.core.UIComponent |
Application component |
See sap.ui.base.Metadata#getName method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
Gets the flexibility delegate information placed at a control.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
See sap.ui.base.ManagedObject#getId method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
See sap.ui.base.ManagedObject#getParent method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
Removes all objects from the aggregation of the given control.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
vParent | sap.ui.base.ManagedObject Element |
Control representation of the parent only needed in XML case |
See sap.ui.base.ManagedObject#getProperty method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
See sap.ui.base.ManagedObject#getBindingInfo method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
Checks if there is a property binding and returns it if available, otherwise returns the value of the property.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
Function for determining the selector that is used later to apply a change for a given control.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element string |
Control or ID string for which the selector should be determined |
|
oAppComponent | sap.ui.core.Component |
Application component, needed only if |
|
mAdditionalSelectorInformation | object |
Additional mapped data which is added to the selector |
Retrieves the current value of the stashed property.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
See sap.ui.core.Control#getVisible method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
Checks if a control ID has a prefix matching the application component. If this prefix exists, the suffix after the component ID is called the local ID.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.core.Control string |
Control or ID to be checked if it is within the generic application |
|
oAppComponent | sap.ui.core.UIComponent |
Application component, needed only if |
See sap.ui.base.ManagedObject#insertAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control which has the aggregation |
|
sAggregationName | string |
Aggregation name |
|
oObject | sap.ui.base.ManagedObject Element |
XML node or element of the control that will be inserted |
|
iIndex | int |
Index for |
|
oView | Element |
XML node of the view, needed in XML case to potentially create (aggregation) nodes |
|
bSkipAdjustIndex | boolean |
true in case of inserting an XML node or element at an extension point, needed only in XML case |
Loads a fragment and turns the result into an array of nodes; also prefixes all the controls with a given namespace; throws an error if there is at least one control in the fragment without a stable ID or has a duplicate ID in the given view.
Param | Type | DefaultValue | Description |
---|---|---|---|
sFragment | string |
XML fragment as string |
|
sNamespace | string |
Namespace of the app |
|
oView | sap.ui.core.mvc.View |
View for the fragment |
See sap.ui.base.ManagedObject#isPropertyInitial method.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
Removes the object from the aggregation of the given control. See sap.ui.base.ManagedObject#removeAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control representation |
|
sAggregationName | string |
Aggregation name |
|
oObject | sap.ui.base.ManagedObject Element |
Aggregated object to be set |
Removes all objects from the aggregation of the given control. See sap.ui.base.ManagedObject#removeAllAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control representation |
|
sAggregationName | string |
Aggregation name |
See sap.ui.base.ManagedObject#setAssociation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control which has the association |
|
sName | string |
Association name |
|
sId | string sap.ui.base.ManagedObject Element |
ID of the managed object that is set as an association, or the managed object or XML node itself or |
See sap.ui.base.ManagedObject#setProperty method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
|
vPropertyValue | any |
New value for the property |
Similar as #bindProperty, but allows to specify binding like in control constructor.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
|
vPropertyBinding | any |
See source of |
Calls sap.ui.core.util.reflection.BaseTreeModifier.setPropertyBinding if the passed value is a binding info object or binding string, otherwise calls sap.ui.core.util.reflection.BaseTreeModifier.setProperty.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name |
|
vBindingOrValue | any |
Property binding or property value |
Sets the new value for stashed and visible.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
bStashed | boolean |
New value for |
See sap.ui.core.Control#setVisible method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
bVisible | boolean |
New value for |
Loads a fragment, processes the XML templating and turns the result into an array of nodes or controls. See sap.ui.core.util.XMLPreprocessor.process
Param | Type | DefaultValue | Description |
---|---|---|---|
sFragmentName | string |
XML fragment name (e.g. some.path.fragmentName) |
|
mPreprocessorSettings | object | {} |
Map/JSON object with initial property values, etc. |
bindingContexts | object |
Binding contexts relevant for template pre-processing |
|
models | object |
Models relevant for template pre-processing |
|
oView | sap.ui.core.mvc.View |
View for the fragment, only needed on JS side |
See sap.ui.base.ManagedObject#unbindAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sAggregationName | string |
Aggregation name to be unbound |
See sap.ui.base.ManagedObject#unbindProperty method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control representation |
|
sPropertyName | string |
Property name to be unbound |
See sap.ui.base.ManagedObject#updateAggregation method.
Param | Type | DefaultValue | Description |
---|---|---|---|
vParent | sap.ui.base.ManagedObject Element |
Control representation |
|
sAggregationName | string |
Aggregation name |
Validates if the control has the correct type for the aggregation.
Param | Type | DefaultValue | Description |
---|---|---|---|
vControl | sap.ui.base.ManagedObject Element |
Control whose type is to be checked |
|
mAggregationMetadata | object |
Aggregation info object |
|
vParent | sap.ui.base.ManagedObject Element |
Parent of the control |
|
sFragment | string |
Path to the fragment that contains the control whose type is to be checked |
|
iIndex | int |
Index of the current control in the parent aggregation |