Class sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPIModule: sap/suite/ui/generic/template/ObjectPage/extensionAPI/ExtensionAPI
Constructor Summary
new sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI()API to be used in extensions of ObjectPage.
Method Summary
sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI with name
sClassName
and enriches it with the information contained in oClassInfo
.sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI.getMetadata()Returns a metadata object for class sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI.
invokeActions(sFunctionName, aContext)Invokes multiple time the action with the given name and submits changes to the back-end.
Constructor Detail
Method Detail
sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI 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.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.suite.ui.generic.template.ObjectPage.extensionAPI.ExtensionAPI.
Returns:
{sap.ui.base.Metadata} | Metadata object describing this class |
attachPageDataLoaded(fnFunction)
Attach a handler to the PageDataLoaded event. This event is fired each time the object page is navigated to or the object to be displayed is changed Note, that the event will not be fired before:
- the navigation to the page has been completed
- the header data of the object are available
Parameters:
{function} | fnFunction | the handler function. Note that the event passed to this function possesses an attribute context which contains the current header context |
attachToView(oControl)
Attaches a control to the current View. Should be called whenever a new control is created and used in the context of this view. This applies especially for dialogs, action sheets, popovers, ... This method cares for defining dependency and handling device specific style classes
Parameters:
{sap.ui.core.Control} | oControl | the control to be attached to the view |
detachPageDataLoaded(fnFunction)
Detach a handler from the PageDataLoaded event
Parameters:
{function} | fnFunction | the handler function |
getSelectedContexts(sUiElementId): sap.ui.model.Context[]
Get the entries currently selected in one ui element
Parameters:
{string} | sUiElementId | the id identifying the ui element the selected context is requested for |
Returns:
{sap.ui.model.Context[]} | contains one entry per entry selected |
getTransactionController(): sap.suite.ui.generic.template.ObjectPage.extensionAPI.DraftTransactionController
Get the transaction controller for editing actions on the page. Note: Currently implemented for draft case
Returns:
{sap.suite.ui.generic.template.ObjectPage.extensionAPI.DraftTransactionController} | the transaction controller |
invokeActions(sFunctionName, aContext): Promise
Invokes multiple time the action with the given name and submits changes to the back-end.
Parameters:
{string} | sFunctionName | The name of the function or action |
{array} | aContext | The given binding contexts |
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 |