Namespace sap.suite.ui.generic.template.extensionAPI.extensionAPIModule: sap/suite/ui/generic/template/extensionAPI/extensionAPI
Static access to extension API for Smart Template Application development
Method Summary
sap.suite.ui.generic.template.extensionAPI.extensionAPI.getExtensionAPIPromise(oControl)Get the extension API valid for the specified control embedded in a Smart Template view.
Method Detail
sap.suite.ui.generic.template.extensionAPI.extensionAPI.getExtensionAPIPromise(oControl): Promise
Get the extension API valid for the specified control embedded in a Smart Template view. Note that extension API can also be retrieved directly from the controller of the Smart Template view. Therefore, this method needs only be called in scenarios where this controller is not directly accessible. The most prominent use case for this would be the context of a controller of a view extension. In this case it is recommended to pass the extending view to this method. Note that this method does not return the extension API directly, but a Promise that resolves to the extension API. Thus, a typical use of this method might look as follows:
extensionAPI.getExtensionAPIPromise(oView).then(function(oExtensionAPI){ oExtensionAPI.someMethod(); });
Parameters:
{sap.ui.core.Control} | oControl | a control which is embedded into a Smart Template view. |
Returns:
{Promise} | A Promise which resolves to the extension API for the embedding Smart Template view |