class sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor

UX Guidelines:
Implements: sap.ui.core.IFormContent
Available since: N/A
Module: sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor
Application Component: CA-UI5-CTR

Base class for property editor implementations.


Constructor

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor()

Properties

Name Type Default Value Description
config object Visibility: public
renderLabel boolean true Visibility: public
value any Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_label 0..1 sap.m.Label
content 0..1 sap.ui.core.Control

Events Overview

Event Description
beforeValueChange

Fires before value is changed

configChange

Fires when config is changed

designtimeMetadataChange

Fires when designtime metadata is changed

fragmentChange

Fires when fragment is changed

init

Fires when init is finished

ready

Fired when the editor fragment was loaded and the asyncInit method was executed

validationErrorChange

Fires when the error state of the editor changes

valueChange

Fires when value is changed

beforeValueChange

Fires before value is changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
path string
value any
nextValue any

configChange

Fires when config is changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
previousConfig object
config object

designtimeMetadataChange

Fires when designtime metadata is changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
path string
value any
previousValue any

fragmentChange

Fires when fragment is changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
previousFragment string
fragment string

init

Fires when init is finished

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

ready

Fired when the editor fragment was loaded and the asyncInit method was executed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

validationErrorChange

Fires when the error state of the editor changes

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
hasError boolean

Whether there is an error in the editor

Since: 1.96.0.

valueChange

Fires when value is changed

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
path string
value any
previousValue any

Methods Overview

Method Description
attachBeforeValueChange

Attaches event handler fnFunction to the beforeValueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires before value is changed

attachConfigChange

Attaches event handler fnFunction to the configChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when config is changed

attachDesigntimeMetadataChange

Attaches event handler fnFunction to the designtimeMetadataChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when designtime metadata is changed

attachFragmentChange

Attaches event handler fnFunction to the fragmentChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when fragment is changed

attachInit

Attaches event handler fnFunction to the init event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when init is finished

attachReady

Attaches event handler fnFunction to the ready event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fired when the editor fragment was loaded and the asyncInit method was executed

attachValidationErrorChange

Attaches event handler fnFunction to the validationErrorChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when the error state of the editor changes

attachValueChange

Attaches event handler fnFunction to the valueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when value is changed

destroyContent

Destroys the content in the aggregation content.

detachBeforeValueChange

Detaches event handler fnFunction from the beforeValueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachConfigChange

Detaches event handler fnFunction from the configChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachDesigntimeMetadataChange

Detaches event handler fnFunction from the designtimeMetadataChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachFragmentChange

Detaches event handler fnFunction from the fragmentChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachInit

Detaches event handler fnFunction from the init event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachReady

Detaches event handler fnFunction from the ready event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachValidationErrorChange

Detaches event handler fnFunction from the validationErrorChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

detachValueChange

Detaches event handler fnFunction from the valueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.extend

Creates a new subclass of class sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor 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.Control.extend.

fireBeforeValueChange

Fires event beforeValueChange to attached listeners.

fireConfigChange

Fires event configChange to attached listeners.

fireDesigntimeMetadataChange

Fires event designtimeMetadataChange to attached listeners.

fireFragmentChange

Fires event fragmentChange to attached listeners.

fireInit

Fires event init to attached listeners.

fireReady

Fires event ready to attached listeners.

fireValidationErrorChange

Fires event validationErrorChange to attached listeners.

fireValueChange

Fires event valueChange to attached listeners.

getConfig

Gets current value of property config.

getContent

Gets content of aggregation content.

sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.getMetadata

Returns a metadata object for class sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

getRenderLabel

Gets current value of property renderLabel.

Default value is true.

getValue

Gets current value of property value.

setConfig

Sets a new value for property config.

When called with a value of null or undefined, the default value of the property will be restored.

setContent

Sets the aggregated content.

setRenderLabel

Sets a new value for property renderLabel.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

setValue

Sets the editor value. If no value is provided, the default value provided in the config will be used instead. This method triggers the ready check, therefore it should also be called when overridden in complex editors.

attachBeforeValueChange

Attaches event handler fnFunction to the beforeValueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires before value is changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachConfigChange

Attaches event handler fnFunction to the configChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when config is changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachDesigntimeMetadataChange

Attaches event handler fnFunction to the designtimeMetadataChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when designtime metadata is changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachFragmentChange

Attaches event handler fnFunction to the fragmentChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when fragment is changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachInit

Attaches event handler fnFunction to the init event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when init is finished

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachReady

Attaches event handler fnFunction to the ready event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fired when the editor fragment was loaded and the asyncInit method was executed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachValidationErrorChange

Attaches event handler fnFunction to the validationErrorChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when the error state of the editor changes

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

attachValueChange

Attaches event handler fnFunction to the valueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

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.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself.

Fires when value is changed

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor itself

destroyContent

Destroys the content in the aggregation content.

detachBeforeValueChange

Detaches event handler fnFunction from the beforeValueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachConfigChange

Detaches event handler fnFunction from the configChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachDesigntimeMetadataChange

Detaches event handler fnFunction from the designtimeMetadataChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachFragmentChange

Detaches event handler fnFunction from the fragmentChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachInit

Detaches event handler fnFunction from the init event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachReady

Detaches event handler fnFunction from the ready event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachValidationErrorChange

Detaches event handler fnFunction from the validationErrorChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

detachValueChange

Detaches event handler fnFunction from the valueChange event of this sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.extend

Creates a new subclass of class sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor 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.Control.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

fireBeforeValueChange

Fires event beforeValueChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

path string
value any
nextValue any

fireConfigChange

Fires event configChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

previousConfig object
config object

fireDesigntimeMetadataChange

Fires event designtimeMetadataChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

path string
value any
previousValue any

fireFragmentChange

Fires event fragmentChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

previousFragment string
fragment string

fireInit

Fires event init to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireReady

Fires event ready to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireValidationErrorChange

Fires event validationErrorChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

hasError boolean

Whether there is an error in the editor

fireValueChange

Fires event valueChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

path string
value any
previousValue any

getConfig

Gets current value of property config.

getContent

Gets content of aggregation content.

sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.getMetadata

Returns a metadata object for class sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor.

getRenderLabel

Gets current value of property renderLabel.

Default value is true.

getValue

Gets current value of property value.

setConfig

Sets a new value for property config.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oConfig object

New value for property config

setContent

Sets the aggregated content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content to set

setRenderLabel

Sets a new value for property renderLabel.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Param Type DefaultValue Description
bRenderLabel boolean true

New value for property renderLabel

setValue

Sets the editor value. If no value is provided, the default value provided in the config will be used instead. This method triggers the ready check, therefore it should also be called when overridden in complex editors.

Param Type DefaultValue Description
vValue any

Editor value that was already processed by a custom setValue implementation

bSuppressValidation boolean

Whether to set the value regardless of the validation result, false by default