The runtime authoring allows to adapt the fields of a running application.
Experimental API:Since 1.30. This class is experimental and provides only limited functionality. Also the API might be changed in future.
Since: 1.30.
Event Summary
selectionChange(oControlEvent)Event fired when a DesignTime selection is changed start(oControlEvent)Fired when the runtime authoring is started stop(oControlEvent)Fired when the runtime authoring is stopped undoRedoStackModified(oControlEvent)Fired when the undo/redo stack has changed, undo/redo buttons can be updated Method Summary
sap.ui.rta.RuntimeAuthoring.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.rta.RuntimeAuthoring with name sClassName
and enriches it with the information contained in oClassInfo
. attachSelectionChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the selectionChange
event of this sap.ui.rta.RuntimeAuthoring
. attachStart(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the start
event of this sap.ui.rta.RuntimeAuthoring
. attachStop(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the stop
event of this sap.ui.rta.RuntimeAuthoring
. attachUndoRedoStackModified(oData?, fnFunction, oListener?)Attaches event handler fnFunction
to the undoRedoStackModified
event of this sap.ui.rta.RuntimeAuthoring
. detachSelectionChange(fnFunction, oListener)Detaches event handler fnFunction
from the selectionChange
event of this sap.ui.rta.RuntimeAuthoring
. detachStart(fnFunction, oListener)Detaches event handler fnFunction
from the start
event of this sap.ui.rta.RuntimeAuthoring
. detachStop(fnFunction, oListener)Detaches event handler fnFunction
from the stop
event of this sap.ui.rta.RuntimeAuthoring
. detachUndoRedoStackModified(fnFunction, oListener)Detaches event handler fnFunction
from the undoRedoStackModified
event of this sap.ui.rta.RuntimeAuthoring
. exit()Exit Runtime Authoring - destroy all controls fireStart(mArguments?)Fires event start
to attached listeners. fireStop(mArguments?)Fires event stop
to attached listeners. getRootControl()ID of the element which is the current target of the association rootControl
, or null
. start()Start Runtime Authoring stop()Stop Runtime Authoring Constructor Detail
new sap.ui.rta.RuntimeAuthoring()
Constructor for a new sap.ui.rta.RuntimeAuthoring class.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- Events
- start : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- stop : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- selectionChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- undoRedoStackModified : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.ManagedObject can be used as well.
Event Detail
selectionChange(oControlEvent)
Event fired when a DesignTime selection is changed
Parameters:
start(oControlEvent)
Fired when the runtime authoring is started
Parameters:
stop(oControlEvent)
Fired when the runtime authoring is stopped
Parameters:
undoRedoStackModified(oControlEvent)
Fired when the undo/redo stack has changed, undo/redo buttons can be updated
Parameters:
Method Detail
sap.ui.rta.RuntimeAuthoring.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.rta.RuntimeAuthoring 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.core.ManagedObject.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 |
Returns a metadata object for class sap.ui.rta.RuntimeAuthoring.
Returns:
Attaches event handler
fnFunction
to the
selectionChange
event of this
sap.ui.rta.RuntimeAuthoring
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.rta.RuntimeAuthoring
itself.
Event fired when a DesignTime selection is changed
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.rta.RuntimeAuthoring itself |
Returns:
Attaches event handler
fnFunction
to the
start
event of this
sap.ui.rta.RuntimeAuthoring
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.rta.RuntimeAuthoring
itself.
Fired when the runtime authoring is started
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.rta.RuntimeAuthoring itself |
Returns:
Attaches event handler
fnFunction
to the
stop
event of this
sap.ui.rta.RuntimeAuthoring
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.rta.RuntimeAuthoring
itself.
Fired when the runtime authoring is stopped
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.rta.RuntimeAuthoring itself |
Returns:
Attaches event handler
fnFunction
to the
undoRedoStackModified
event of this
sap.ui.rta.RuntimeAuthoring
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.rta.RuntimeAuthoring
itself.
Fired when the undo/redo stack has changed, undo/redo buttons can be updated
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.rta.RuntimeAuthoring itself |
Returns:
closeToolBars()
Close Toolbars
Detaches event handler
fnFunction
from the
selectionChange
event of this
sap.ui.rta.RuntimeAuthoring
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
start
event of this
sap.ui.rta.RuntimeAuthoring
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
stop
event of this
sap.ui.rta.RuntimeAuthoring
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Detaches event handler
fnFunction
from the
undoRedoStackModified
event of this
sap.ui.rta.RuntimeAuthoring
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
exit()
Exit Runtime Authoring - destroy all controls
Fires event
selectionChange
to attached listeners.
Expects the following event parameters:
selection
of type sap.ui.dt.Overlay[]
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event start
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event stop
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event undoRedoStackModified
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getCustomFieldUrl(): string
Gets current value of property
customFieldUrl
.
The URL which is called when the custom field dialog is opened
Returns:
{string} | Value of property customFieldUrl |
ID of the element which is the current target of the association rootControl
, or null
.
Returns:
getSelection(): sap.ui.dt.Overlay[]
Returns a selection from the DesignTime
Returns:
{sap.ui.dt.Overlay[]} | selected overlays |
getShowCreateCustomField(): boolean
Gets current value of property
showCreateCustomField
.
Whether the create custom field button should be shown
Returns:
{boolean} | Value of property showCreateCustomField |
getShowSettingsDialog(): boolean
Gets current value of property
showSettingsDialog
.
Temporary property : whether to show a dialog for changing control's properties# should be removed after DTA will fully switch to a property panel
Default value is true
.
Returns:
{boolean} | Value of property showSettingsDialog |
getShowToolbars(): boolean
Gets current value of property
showToolbars
.
Whether the create custom field button should be shown
Default value is true
.
Returns:
{boolean} | Value of property showToolbars |
getShowWindowUnloadDialog(): boolean
Gets current value of property
showWindowUnloadDialog
.
Whether the window unload dialog should be shown
Default value is true
.
Returns:
{boolean} | Value of property showWindowUnloadDialog |
Sets a new value for property
customFieldUrl
.
The URL which is called when the custom field dialog is opened
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sCustomFieldUrl | New value for property customFieldUrl |
Returns:
Sets the associated rootControl
.
Parameters:
{sap.ui.core.Control} | oRootControl | Id of an element which becomes the new target of this rootControl association; alternatively, an element instance may be given |
Returns:
Sets a new value for property
showCreateCustomField
.
Whether the create custom field button should be shown
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{boolean} | bShowCreateCustomField | New value for property showCreateCustomField |
Returns:
Sets a new value for property
showSettingsDialog
.
Temporary property : whether to show a dialog for changing control's properties# should be removed after DTA will fully switch to a property panel
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowSettingsDialog | New value for property showSettingsDialog |
Returns:
Sets a new value for property
showToolbars
.
Whether the create custom field button should be shown
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowToolbars | New value for property showToolbars |
Returns:
Sets a new value for property
showWindowUnloadDialog
.
Whether the window unload dialog should be shown
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bShowWindowUnloadDialog | New value for property showWindowUnloadDialog |
Returns:
start()
Start Runtime Authoring
stop()
Stop Runtime Authoring