class sap.ui.generic.app.ApplicationController

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/generic/app/ApplicationController
Application Component: CA-UI5-ST

Application Controller.


Constructor

Constructor for application controller.

new sap.ui.generic.app.ApplicationController(oModel, oView)
Param Type Default Value Description
oModel sap.ui.model.odata.v2.ODataModel

The OData model currently used

oView sap.ui.core.mvc.View

The current view


Methods Overview

Method Description
destroy

Frees all resources claimed during the life-time of this instance.

executeSideEffects

Executes annotated side effects for properties/navigation properties or navigation entities. If no properties or entities are passed the unspecified side effect is executed. This unspecified side effect uses either the annotated targets of the unspecified side effect or - in case of no available annotation - triggers a complete model refresh on the OData model.

sap.ui.generic.app.ApplicationController.extend

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 sap.ui.generic.app.transaction.BaseController.extend.

sap.ui.generic.app.ApplicationController.getMetadata

Returns a metadata object for class sap.ui.generic.app.ApplicationController.

getNewActionContext

Creates a context for an action call (OData function import)

getTransactionController

Returns the current transaction controller instance.

invokeActions

Invokes an action for every provided context where the properties are taken as input from. The changes are submitted directly to the back-end.

propertyChanged

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.

registerGroupChange

Registers a change for the given group id.

registerView

Registers the given view with the Application Controller.

destroy

Frees all resources claimed during the life-time of this instance.

executeSideEffects

Executes annotated side effects for properties/navigation properties or navigation entities. If no properties or entities are passed the unspecified side effect is executed. This unspecified side effect uses either the annotated targets of the unspecified side effect or - in case of no available annotation - triggers a complete model refresh on the OData model.

Param Type DefaultValue Description
oContext sap.ui.model.Context

The given binding context

aSourceProperties array

An array of properties of the given context or properties in a 1:1 association for those side effects shall be executed. Can be undefined.

aSourceEntities array

An array of entities (navigation properties) with the side effects that shall be executed. Can be undefined.

bForceGlobalRefresh boolean

If not explicitly set to false a global model refresh is triggered.

sap.ui.generic.app.ApplicationController.extend

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 sap.ui.generic.app.transaction.BaseController.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.generic.app.ApplicationController.getMetadata

Returns a metadata object for class sap.ui.generic.app.ApplicationController.

getNewActionContext

Creates a context for an action call (OData function import)

Param Type DefaultValue Description
sFunctionName string

Name of the function import that shall be triggered.

oEntityContext object

The given binding context of the object on which the action is called.

mParameters Object<string,any>

Parameters to control the behavior of the request.

getTransactionController

Returns the current transaction controller instance.

invokeActions

Invokes an action for every provided context where the properties are taken as input from. The changes are submitted directly to the back-end.

Param Type DefaultValue Description
sFunctionName string

The name of the function or action that shall be triggered.

aContexts array

The given binding contexts where the parameters of the action shall be filled from.

mParameters Object<string,any>

Parameters to control the behavior of the request.

operationGrouping string

if set to "com.sap.vocabularies.UI.v1.OperationGroupingType/ChangeSet" for every actition call a new group is used.

propertyChanged

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.

Param Type DefaultValue Description
sPath string

The path to the changed property

oContext object

The binding context in which the change occured

registerGroupChange

Registers a change for the given group id.

Param Type DefaultValue Description
sGroupId string

The group id where changes were done

registerView

Registers the given view with the Application Controller.

Param Type DefaultValue Description
oView sap.ui.core.mvc.View

The view to be registered