Class sap.ui.generic.app.ApplicationControllerModule: sap/ui/generic/app/ApplicationController


Application Controller.

Experimental API:Since 1.32.0


Since: 1.32.0.
Constructor Summary
new sap.ui.generic.app.ApplicationController(oModel, oView)Constructor for application controller.
Method Summary
sap.ui.generic.app.ApplicationController.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.generic.app.ApplicationController with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.generic.app.ApplicationController.getMetadata()Returns a metadata object for class sap.ui.generic.app.ApplicationController.
destroy()Frees all resources claimed during the life-time of this instance.
executeSideEffects(oContext, aSourceProperties, aSourceEntities)executes annotated side effect for properties/navigation properties or navigation entities.
getNewActionContext(sFunctionName, oEntityContext, mParameters)Creates a context for an action call (OData function import)
getTransactionController()Returns the current transaction controller instance.
invokeActions(sFunctionName, aContext, mParameters)Invokes an action for every provided context where the properties are taken as input from.
propertyChanged(sEntitySet, sProperty, oBinding, oControl)Notifies the application controller of a change of a property.
registerGroupChange(sGroupId)Registers a change for the given group id.
registerView(oView)Registers the given view with the Application Controller.
Constructor Detail
new sap.ui.generic.app.ApplicationController(oModel, oView)
Constructor for application controller.
Parameters:
{sap.ui.model.odata.v2.ODataModel}oModel The OData model currently used
{sap.ui.core.mvc.View}oView The current view
Exceptions:
{Error}
If no model is handed over as input parameter
Method Detail
sap.ui.generic.app.ApplicationController.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.generic.app.ApplicationController with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in Object.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.generic.app.ApplicationController.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.generic.app.ApplicationController.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
destroy()
Frees all resources claimed during the life-time of this instance.

Experimental API:Since 1.32.0

Experimental:
Since 1.32.0
executeSideEffects(oContext, aSourceProperties, aSourceEntities): Promise
executes annotated side effect for properties/navigation properties or navigation entities. If no properties or entities are passed the unspecified side effect is executed which reads either the annotated targets of the unspecified side effect or in case of no available annotation a complete model refresh
Parameters:
{sap.ui.model.Context}oContext The given binding context
{array}aSourceProperties An array of properties of the given context or properties in a 1:1 association for those side effects shall be executed
{array}aSourceEntities An array of entities (navigation properties) for those side effects shall be executed
Returns:
{Promise} A Promise for asynchronous execution of the action
getNewActionContext(sFunctionName, oEntityContext, mParameters): Promise
Creates a context for an action call (OData function import)

Experimental API:

Parameters:
{string}sFunctionName
{object}oEntityContext The given binding context of the object on which the action is called
{map}mParameters Parameters to control the behavior of the request
Experimental:
Since:
1.38
Returns:
{Promise}
Returns the current transaction controller instance.
Returns:
{sap.ui.generic.app.transaction.TransactionController} The transaction controller instance
invokeActions(sFunctionName, aContext, mParameters): Promise
Invokes an action for every provided context where the properties are taken as input from. The changes are submitted directly to the back-end.
Parameters:
{string}sFunctionName The name of the function or action
{array}aContext The given binding contexts
{map}mParameters Parameters to control the behavior of the request
Exceptions:
{Error} Throws an error if the OData function import does not exist or the action input parameters are invalid
Returns:
{Promise} A Promise for asynchronous execution of the action
propertyChanged(sEntitySet, sProperty, oBinding, oControl): Promise
Notifies the application controller of a change of a property. Please note that the method is not meant for productive use currently. It is experimental.

Experimental API:Since 1.32.0

Parameters:
{string}sEntitySet The name of the entity set
{string}sProperty Path identifying the changed property
{object}oBinding The binding associated with the changed property
{sap.ui.comp.smartfield.SmartField}oControl The SmartField that changed the property
Experimental:
Since 1.32.0
Returns:
{Promise} A Promise for asynchronous execution of the action
registerGroupChange(sGroupId)
Registers a change for the given group id.

Experimental API:Since 1.32.0

Parameters:
{string}sGroupId The group id where changes were done
Experimental:
Since 1.32.0
registerView(oView)
Registers the given view with the Application Controller.

Experimental API:Since 1.32.0

Parameters:
{sap.ui.core.odata.mvc.View}oView The view to be registered
Experimental:
Since 1.32.0