Class Index | File Index

Classes


Namespace chip.configurationUi

The namespace for the CHIP API's configurationUi contract, which allows you to provide a CHIP-specific configuration UI with all related functionality.
Defined in: configurationUi.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
chip.configurationUi.attachCancel(fnEventHandler)
Attaches the given event handler to the "cancel" event which is fired whenever the user chooses to cancel configuration.
<static>  
chip.configurationUi.attachSave(fnEventHandler)
Attaches the given event handler to the "save" event which is fired whenever the user chooses to save the current configuration.
<static>  
chip.configurationUi.display()
Inform the embedding application that the user has triggered configuration of this CHIP.
<static>  
chip.configurationUi.isEnabled()
Tells whether configuration of CHIPs is enabled.
<static>  
chip.configurationUi.isReadOnly()
Tells whether this CHIP is readOnly.
<static>  
chip.configurationUi.setDirtyProvider(fnProvider)
Determines the callback function which provides the configuration UI's "dirty" state for this CHIP.
<static>  
chip.configurationUi.setUiProvider(fnProvider)
Determines the callback function which provides the configuration UI for this CHIP.
Namespace Detail
chip.configurationUi
Since:
1.11.0
Method Detail
<static> chip.configurationUi.attachCancel(fnEventHandler)
Attaches the given event handler to the "cancel" event which is fired whenever the user chooses to cancel configuration. You can inform the user about unsaved changes by setting a "dirty" provider. Use Function.prototype.bind() to determine the event handler's this or some of its arguments. Note: Without such an event handler, it will not be possible to cancel the configuration UI for this CHIP.
Parameters:
{function} fnEventHandler
event handler for canceling configuration
Since:
1.11.0
See:
chip.configurationUi.attachSave
chip.configurationUi.setDirtyProvider

<static> chip.configurationUi.attachSave(fnEventHandler)
Attaches the given event handler to the "save" event which is fired whenever the user chooses to save the current configuration. The event handler should return a jQuery.Deferred object's promise to inform the caller whether the save operation has been successful or not. In the latter case an error message is provided. Use Function.prototype.bind() to determine the event handler's this or some of its arguments. Note: Without such an event handler, it will not be possible to save configurations for this CHIP.
Parameters:
{function} fnEventHandler
event handler for saving the current configuration; returns a jQuery.Deferred object's promise
Since:
1.11.0
See:
chip.configurationUi.attachCancel

<static> chip.configurationUi.display()
Inform the embedding application that the user has triggered configuration of this CHIP. The embedding application will get this CHIP's configuration UI from the callback determined via chip.configurationUi.setUiProvider() and display it with additional "save" and "cancel" buttons. If these are pressed, the CHIP instance is informed via the corresponding "save" and "cancel" events.
Since:
1.11.0
See:
chip.configurationUi.attachCancel
chip.configurationUi.attachSave
chip.configurationUi.setUiProvider

<static> {boolean} chip.configurationUi.isEnabled()
Tells whether configuration of CHIPs is enabled. Note that this value is constant throughout a CHIP's lifetime. If configuration is enabled, CHIPs should provide a way for the user to trigger configuration and should not display live data (as administrators will not have the corresponding permissions). This trigger should then inform the embedding application to display the configuration UI.
Since:
1.11.0
Returns:
{boolean} whether configuration is enabled
See:
chip.configurationUi.display

<static> {boolean} chip.configurationUi.isReadOnly()
Tells whether this CHIP is readOnly. Before calling this method please ensure that it is available. (Extension of an already existing contract)
Since:
1.32.0
Returns:
{boolean} whether this CHIP instance is readOnly

<static> chip.configurationUi.setDirtyProvider(fnProvider)
Determines the callback function which provides the configuration UI's "dirty" state for this CHIP. The callback has to return a boolean value telling whether this CHIP's configuration UI is currently in a "dirty" state, i.e. contains unsaved changes. An embedding application calls this function each time the user wants to cancel the CHIP's configuration UI. A confirmation dialog will be presented to the user in case the UI is "dirty". Use Function.prototype.bind() to determine the callback's this or some of its arguments. Note: Without such a callback, it will not be possible to inform the user about unsaved changes.
Parameters:
{function} fnProvider
a callback which returns a boolean value telling whether this CHIP's configuration UI is currently in a "dirty" state
Since:
1.11.0
See:
chip.configurationUi.attachCancel

<static> chip.configurationUi.setUiProvider(fnProvider)
Determines the callback function which provides the configuration UI for this CHIP. The callback has to return an SAPUI5 control (sap.ui.core.Control), which, for example, can be a view or a component wrapped into a sap.ui.core.ComponentContainer. An embedding application calls this function each time it wants to display the CHIP's configuration UI. Once the user chooses to save or cancel the configuration, the UI will be removed from the embedding application's UI, but not destroyed! Use the event handlers for the corresponding "save" and "cancel" events to clean up the UI as necessary (e.g. destroy it). Use Function.prototype.bind() to determine the callback's this or some of its arguments. Note: Without such a callback, it will not be possible to configure this CHIP.
Parameters:
{function (map <string|string>)} fnProvider
a callback which returns an SAPUI5 control (sap.ui.core.Control) representing this CHIP's configuration UI. Since 1.21.0 an optional parameter map can be passed to the UI provider. This map can be used for example to pass default configuration values to the UI.
Since:
1.11.0
See:
chip.configurationUi.attachCancel
chip.configurationUi.attachSave

©Copyright (c) 2009-2014 SAP SE, All Rights Reserved
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 14 2017 08:48:14 GMT-0000 (UTC)