Class sap.ui.comp.smartfield.SmartFieldModule: sap/ui/comp/smartfield/SmartField

extends Control

The SmartField control is a wrapper for other controls. It interprets OData metadata to determine the control that has to be instantiated. The OData entity is derived from the control's binding context. The OData entity's property that is changed or displayed with the control is derived from the control's value property.

A detailed description of the OData annotations handled by this control is available here.
Annotation Limitations: Qualifier support for entity types is limited for this control.

Constructor Summary
new sap.ui.comp.smartfield.SmartField(sId?, mSettings?)Constructor for a new smartfield/SmartField.
Event Summary
change(oControlEvent)The event is fired after the text in the field has changed and the focus leaves the TextField or Enter is pressed.
contextEditableChanged(oControlEvent)The event is fired after the context editable property of the control has changed.
editableChanged(oControlEvent)The event is fired after the value of editable property of the control has changed.
entitySetFound(oControlEvent)The OData entity set is either derived from the control's binding context or from control's entity set property, if a value for it is specified.
initialise(oControlEvent)The event is fired after the smart field has calculated its metadata.
innerControlsCreated(oControlEvent)The event is fired after the inner controls have been created.
press(oControlEvent)Fires when the user triggers the link control or taps/clicks on an active title of the object identifier control.
valueListChanged(oControlEvent)The event is fired when after selection of values with value help or auto-suggest, the model is updated with the selected data.
visibleChanged(oControlEvent)The event is fired after the visibility of the control has changed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.comp.smartfield.SmartField.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.smartfield.SmartField with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.smartfield.SmartField.getMetadata()Returns a metadata object for class sap.ui.comp.smartfield.SmartField.
sap.ui.comp.smartfield.SmartField.getSupportedAnnotationPaths(oMetaModel, oEntitySet, sValueBinding, bNavigationPathsOnly)Calculates the paths to the annotations used by the SmartField.
_getEmbeddedSmartField()Resolves the controls hosted currently by this SmartField.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
addAssociation(sAssociationName, sId, bSuppressInvalidate?)Adds some object with the ID sId to the association identified by sAssociationName and marks this ManagedObject as changed.
attachChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the change event of this sap.ui.comp.smartfield.SmartField.
attachContextEditableChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the contextEditableChanged event of this sap.ui.comp.smartfield.SmartField.
attachEditableChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the editableChanged event of this sap.ui.comp.smartfield.SmartField.
attachEntitySetFound(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the entitySetFound event of this sap.ui.comp.smartfield.SmartField.
attachInitialise(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the initialise event of this sap.ui.comp.smartfield.SmartField.
attachInnerControlsCreated(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the innerControlsCreated event of this sap.ui.comp.smartfield.SmartField.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.ui.comp.smartfield.SmartField.
attachValueListChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the valueListChanged event of this sap.ui.comp.smartfield.SmartField.
attachVisibleChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the visibleChanged event of this sap.ui.comp.smartfield.SmartField.
checkClientError()Returns whether a client error has been detected.
destroyConfiguration()Destroys the configuration in the aggregation configuration.
detachChange(fnFunction, oListener)Detaches event handler fnFunction from the change event of this sap.ui.comp.smartfield.SmartField.
detachContextEditableChanged(fnFunction, oListener)Detaches event handler fnFunction from the contextEditableChanged event of this sap.ui.comp.smartfield.SmartField.
detachEditableChanged(fnFunction, oListener)Detaches event handler fnFunction from the editableChanged event of this sap.ui.comp.smartfield.SmartField.
detachEntitySetFound(fnFunction, oListener)Detaches event handler fnFunction from the entitySetFound event of this sap.ui.comp.smartfield.SmartField.
detachInitialise(fnFunction, oListener)Detaches event handler fnFunction from the initialise event of this sap.ui.comp.smartfield.SmartField.
detachInnerControlsCreated(fnFunction, oListener)Detaches event handler fnFunction from the innerControlsCreated event of this sap.ui.comp.smartfield.SmartField.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.ui.comp.smartfield.SmartField.
detachValueListChanged(fnFunction, oListener)Detaches event handler fnFunction from the valueListChanged event of this sap.ui.comp.smartfield.SmartField.
detachVisibleChanged(fnFunction, oListener)Detaches event handler fnFunction from the visibleChanged event of this sap.ui.comp.smartfield.SmartField.
fireChange(mArguments?)Fires event change to attached listeners.
fireContextEditableChanged(mArguments?)Fires event contextEditableChanged to attached listeners.
fireEditableChanged(mArguments?)Fires event editableChanged to attached listeners.
fireEntitySetFound(mArguments?)Fires event entitySetFound to attached listeners.
fireInitialise(mArguments?)Fires event initialise to attached listeners.
fireInnerControlsCreated(mArguments?)Fires event innerControlsCreated to attached listeners.
firePress(mArguments?)Fires event press to attached listeners.
fireValueListChanged(mArguments?)Fires event valueListChanged to attached listeners.
fireVisibleChanged(mArguments?)Fires event visibleChanged to attached listeners.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getClientSideMandatoryCheck()Gets current value of property clientSideMandatoryCheck.
getConfiguration()Gets content of aggregation configuration.
getContextEditable()Gets current value of property contextEditable.
getControlContext()Gets current value of property controlContext.
getDataProperty()Returns the OData property to which the value property of the control is bound.
getDataType()Returns the EDM data type of the OData property to which the value property of the control is bound to.
getEditable()Gets current value of property editable.
getEnabled()Gets current value of property enabled.
getEntitySet()Gets current value of property entitySet.
getFocusDomRef()Returns the DOM element that gets the focus.
getInnerControls()Resolves the controls hosted currently by this SmartField.
getMandatory()Gets current value of property mandatory.
getMaxLength()Gets current value of property maxLength.
getName()Gets current value of property name.
getPlaceholder()Gets current value of property placeholder.
getShowLabel()Gets current value of property showLabel.
getShowSuggestion()Gets current value of property showSuggestion.
getShowValueHelp()Gets current value of property showValueHelp.
getShowValueStateMessage()Gets current value of property showValueStateMessage.
getTextAlign()Gets current value of property textAlign.
getTextLabel()Gets current value of property textLabel.
getTooltipLabel()Gets current value of property tooltipLabel.
getUnitOfMeasure()If the OData property to which the control's value property is bound semantically represents a unit of measure, the value of the current unit of measure is returned.
getUomEditable()Gets current value of property uomEditable.
getUomEditState()Gets current value of property uomEditState.
getUomEnabled()Gets current value of property uomEnabled.
getUomVisible()Gets current value of property uomVisible.
getUrl()Gets current value of property url.
getValue()Returns the value of the value property.
getValueState()Getter for property valueState.
getValueStateText()Getter for property valueStateText.
getWidth()Gets current value of property width.
getWrapping()Gets current value of property wrapping.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
setClientSideMandatoryCheck(bClientSideMandatoryCheck)Sets a new value for property clientSideMandatoryCheck.
setConfiguration(oConfiguration)Sets the aggregated configuration.
setContextEditable(bValue)Setter for property contextEditable.
setControlContext(sControlContext)Sets a new value for property controlContext.
setEditable(bValue)Setter for property editable.
setEnabled(bValue)Setter for property enabled.
setEntitySet(sValue)Setter for property entitySet.
setMandatory(bMandatory)Sets a new value for property mandatory.
setMaxLength(iMaxLength)Sets a new value for property maxLength.
setName(sName)Sets a new value for property name.
setPlaceholder(sPlaceholder)Sets a new value for property placeholder.
setShowLabel(bShowLabel)Sets a new value for property showLabel.
setShowSuggestion(bShowSuggestion)Sets a new value for property showSuggestion.
setShowValueHelp(bShowValueHelp)Sets a new value for property showValueHelp.
setShowValueStateMessage(bShowValueStateMessage)Sets a new value for property showValueStateMessage.
setTextAlign(sTextAlign)Sets a new value for property textAlign.
setTextLabel(sTextLabel)Sets a new value for property textLabel.
setTooltipLabel(sTooltipLabel)Sets a new value for property tooltipLabel.
setUnitOfMeasure(sUnit)If the OData property the control's value property is bound to semantically represents a unit of measure, the value of the current unit of measure can be changed.
setUomEditable(bUomEditable)Sets a new value for property uomEditable.
setUomEditState(iUomEditState)Sets a new value for property uomEditState.
setUomEnabled(bUomEnabled)Sets a new value for property uomEnabled.
setUomVisible(bUomVisible)Sets a new value for property uomVisible.
setUrl(sValue)Setter for property url.
setValue(oValue)Setter for property value.
setValueState(sValueState)Setter for property valueState.
setValueStateText(sText)Setter for property valueStateText.
setVisible(bValue, bSuppressInvalidate)Setter for property visible.
setWidth(sWidth)Setter for property width.
setWrapping(bWrapping)Setter for property wrapping.
destroyControlProposal()Destroys the controlProposal in the aggregation controlProposal.
getControlProposal()Gets content of aggregation controlProposal.
getJsontype()Gets current value of property jsontype.
getProposedControl()Gets current value of property proposedControl.
setControlProposal(oControlProposal)Sets the aggregated controlProposal.
setJsontype(sJsontype)Sets a new value for property jsontype.
setProposedControl(sProposedControl)Sets a new value for property proposedControl.
OData Annotation Summary
(Edm) Based on the data type the SmartField determines the rendering of the inner control.
FieldControl(com.sap.vocabularies.Common.v1) on Property,RecordDefines whether the control is visible.
FieldControl(com.sap.vocabularies.Common.v1) on Property,RecordDefines whether the control is read-only.
FieldControl(com.sap.vocabularies.Common.v1) on Property,RecordDefines whether the control is mandatory.
Masked(com.sap.vocabularies.Common.v1) on PropertyDetermines that a control must not display the actual value in a field with sensitive data, but replace it with a placeholder, for example, *.
Label(com.sap.vocabularies.Common.v1) on Property,PropertyPathA short, human-readable text suitable for labels on user interfaces.
Text(com.sap.vocabularies.Common.v1) on PropertyA descriptive text for values of the annotated property.
TextArrangement(com.sap.vocabularies.UI.v1) on EntityTypeDescribes the arrangement of a code value and its text.
ISOCurrency(Org.OData.Measures.V1) on PropertyDefines a currency code for an amount according to the ISO 4217 standard.
Unit(Org.OData.Measures.V1) on PropertyThe unit of measure for this measured quantity, for example, cm for centimeters.
Scale(Org.OData.Measures.V1) on PropertyDefines the number of digits that are to be displayed after the decimal point.
QuickInfo(com.sap.vocabularies.Common.v1) on PropertyA short, human-readable text suitable for tool tips in user interfaces.
MultiLineText(com.sap.vocabularies.UI.v1) on Property,PropertyPathProperties annotated with this annotation are rendered as multi-line text (for example, text area).
IsUpperCase(com.sap.vocabularies.Common.v1) on Property,ParameterDefines whether a string value is capitalized.
InsertRestrictions/Insertable(Org.OData.Capabilities.V1) on EntitySetDefines whether an EntitySet can be created.
Computed(Org.OData.Core.V1) on PropertyDefines whether a Property can be created.
UpdateRestrictions/Updatable(Org.OData.Capabilities.V1) on EntitySetDefines whether an EntitySet can be updated.
Immutable(Org.OData.Core.V1) on PropertyA value for this non-key property can be provided on insert and cannot even be changed on update actions.
SideEffects(com.sap.vocabularies.Common.v1) on EntitySet,EntityType,ComplexTypeChanges to the source properties may have side-effects on the target properties or entities.
ValueList(com.sap.vocabularies.Common.v1) on Property,ParameterSpecifies how to get a list of acceptable values for a property or parameter.
Constructor Detail
new sap.ui.comp.smartfield.SmartField(sId?, mSettings?)
Constructor for a new smartfield/SmartField.

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:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no id is given
{object}mSettings? Initial settings for the new control
Event Detail
change(oControlEvent)
The event is fired after the text in the field has changed and the focus leaves the TextField or Enter is pressed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
contextEditableChanged(oControlEvent)
The event is fired after the context editable property of the control has changed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.31.0
editableChanged(oControlEvent)
The event is fired after the value of editable property of the control has changed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.30.0
entitySetFound(oControlEvent)
The OData entity set is either derived from the control's binding context or from control's entity set property, if a value for it is specified. In both cases this event is fired.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
initialise(oControlEvent)
The event is fired after the smart field has calculated its metadata.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
innerControlsCreated(oControlEvent)
The event is fired after the inner controls have been created.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
press(oControlEvent)
Fires when the user triggers the link control or taps/clicks on an active title of the object identifier control.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.36.0
valueListChanged(oControlEvent)
The event is fired when after selection of values with value help or auto-suggest, the model is updated with the selected data.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.31.0
visibleChanged(oControlEvent)
The event is fired after the visibility of the control has changed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.comp.smartfield.SmartField.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.smartfield.SmartField 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.

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.ui.comp.smartfield.SmartField.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.smartfield.SmartField.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
sap.ui.comp.smartfield.SmartField.getSupportedAnnotationPaths(oMetaModel, oEntitySet, sValueBinding, bNavigationPathsOnly): array
Calculates the paths to the annotations used by the SmartField.
Parameters:
{sap.ui.model.odata.ODataMetaModel}oMetaModel The given OData meta model
{object}oEntitySet The given entity set
{string}sValueBinding The path identifying the OData property the value property of the SmartField is bound to
{boolean}bNavigationPathsOnly If set to true, no properties are returned
Returns:
{array} The resulting paths are returned
_getEmbeddedSmartField(): array
Resolves the controls hosted currently by this SmartField.
Returns:
{array} The controls hosted currently by this SmartField
addAriaLabelledBy(vAriaLabelledBy): sap.ui.comp.smartfield.SmartField
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
{string|sap.ui.core.Control}vAriaLabelledBy the ariaLabelledBy to add; if empty, nothing is inserted
Since:
1.34.2
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
addAssociation(sAssociationName, sId, bSuppressInvalidate?): sap.ui.base.ManagedObject
Adds some object with the ID sId to the association identified by sAssociationName and marks this ManagedObject as changed. This method does not avoid duplicates. Note: This method is a low-level API as described in the class documentation. Applications or frameworks must not use this method to generically add an object to an association. Use the concrete method addXYZ for association 'XYZ' or the generic applySettings instead.
Parameters:
{string}sAssociationName the string identifying the association the object should be added to.
{string|sap.ui.base.ManagedObject}sId the ID of the ManagedObject object to add; if empty, nothing is added; if a sap.ui.base.ManagedObject is given, its ID is added
{boolean}bSuppressInvalidate? if true, this managed object as well as the newly associated object are not marked as changed
Returns:
{sap.ui.base.ManagedObject} Returns this to allow method chaining
attachChange(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the change event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired after the text in the field has changed and the focus leaves the TextField or Enter is pressed.

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.comp.smartfield.SmartField itself
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachContextEditableChanged(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the contextEditableChanged event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired after the context editable property of the control has 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.comp.smartfield.SmartField itself
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachEditableChanged(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the editableChanged event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired after the value of editable property of the control has 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.comp.smartfield.SmartField itself
Since:
1.30.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachEntitySetFound(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the entitySetFound event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The OData entity set is either derived from the control's binding context or from control's entity set property, if a value for it is specified. In both cases this event is fired.

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.comp.smartfield.SmartField itself
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachInitialise(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the initialise event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired after the smart field has calculated its metadata.

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.comp.smartfield.SmartField itself
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachInnerControlsCreated(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the innerControlsCreated event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired after the inner controls have been created.

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.comp.smartfield.SmartField itself
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachPress(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the press event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

Fires when the user triggers the link control or taps/clicks on an active title of the object identifier control.

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.comp.smartfield.SmartField itself
Since:
1.36.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachValueListChanged(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the valueListChanged event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired when after selection of values with value help or auto-suggest, the model is updated with the selected data.

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.comp.smartfield.SmartField itself
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
attachVisibleChanged(oData?, fnFunction, oListener?): sap.ui.comp.smartfield.SmartField
Attaches event handler fnFunction to the visibleChanged event of this sap.ui.comp.smartfield.SmartField.

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.comp.smartfield.SmartField itself.

The event is fired after the visibility of the control has 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.comp.smartfield.SmartField itself
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
checkClientError(): boolean
Returns whether a client error has been detected. Additionally the error message is shown, if this is not the case already.
Returns:
{boolean}true, if a client error has been detected, false otherwise
destroyConfiguration(): sap.ui.comp.smartfield.SmartField
Destroys the configuration in the aggregation configuration.
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachChange(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the change event of this sap.ui.comp.smartfield.SmartField.

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:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachContextEditableChanged(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the contextEditableChanged event of this sap.ui.comp.smartfield.SmartField.

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
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachEditableChanged(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the editableChanged event of this sap.ui.comp.smartfield.SmartField.

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
Since:
1.30.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachEntitySetFound(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the entitySetFound event of this sap.ui.comp.smartfield.SmartField.

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:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachInitialise(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the initialise event of this sap.ui.comp.smartfield.SmartField.

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:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachInnerControlsCreated(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the innerControlsCreated event of this sap.ui.comp.smartfield.SmartField.

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:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachPress(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the press event of this sap.ui.comp.smartfield.SmartField.

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
Since:
1.36.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachValueListChanged(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the valueListChanged event of this sap.ui.comp.smartfield.SmartField.

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
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
detachVisibleChanged(fnFunction, oListener): sap.ui.comp.smartfield.SmartField
Detaches event handler fnFunction from the visibleChanged event of this sap.ui.comp.smartfield.SmartField.

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:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireChange(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event change to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireContextEditableChanged(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event contextEditableChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireEditableChanged(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event editableChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.30.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireEntitySetFound(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event entitySetFound to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireInitialise(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event initialise to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireInnerControlsCreated(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event innerControlsCreated to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
firePress(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event press to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.36.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireValueListChanged(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event valueListChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
fireVisibleChanged(mArguments?): sap.ui.comp.smartfield.SmartField
Fires event visibleChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
getAccessibilityInfo()
See:
sap.ui.core.Control#getAccessibilityInfo
getAriaLabelledBy(): sap.ui.core.Control[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Since:
1.34.2
Returns:
{sap.ui.core.Control[]}
getClientSideMandatoryCheck(): boolean
Gets current value of property clientSideMandatoryCheck.

Determines if the mandatory check happens on the client side true or on the server side false.

Default value is true.

Since:
1.38.3
Returns:
{boolean} Value of property clientSideMandatoryCheck
Gets content of aggregation configuration.

Optional configuration for SmartField.

Returns:
{sap.ui.comp.smartfield.Configuration}
getContextEditable(): boolean
Gets current value of property contextEditable.

Notifies the control whether controls using the SmartField are editable or not.

Default value is true.

Since:
1.31.0
Returns:
{boolean} Value of property contextEditable
Gets current value of property controlContext.

Defines in which context the layout of the smart field has to be interpreted.

Default value is None.

Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.ControlContextType} Value of property controlContext
getDataProperty(): object
Returns the OData property to which the value property of the control is bound.
Returns:
{object} The OData property.
getDataType(): string
Returns the EDM data type of the OData property to which the value property of the control is bound to. If no model or no OData property is available null is returned.
Returns:
{string} The data type to which the value property is bound.
getEditable(): boolean
Gets current value of property editable.

Sets the control into an editable mode or a display mode.

Default value is true.

Returns:
{boolean} Value of property editable
getEnabled(): boolean
Gets current value of property enabled.

Enables the control.

Default value is true.

Returns:
{boolean} Value of property enabled
getEntitySet(): string
Gets current value of property entitySet.

The name of an entity set for which the control manages values. This is an optional property.

Returns:
{string} Value of property entitySet
getFocusDomRef(): sap.ui.core.Element
Returns the DOM element that gets the focus.
Returns:
{sap.ui.core.Element} The DOM element that should get the focus, can be null
getInnerControls(): array
Resolves the controls hosted currently by this SmartField.
Returns:
{array} The controls hosted currently by this SmartField
getMandatory(): boolean
Gets current value of property mandatory.

Mandatory property.

Default value is false.

Returns:
{boolean} Value of property mandatory
getMaxLength(): int
Gets current value of property maxLength.

Maximum number of characters. Value 0 means the feature is switched off.

Default value is 0.

Returns:
{int} Value of property maxLength
getName(): string
Gets current value of property name.

To be used in the HTML code (for example, for HTML forms that send data to the server via 'submit').

Returns:
{string} Value of property name
getPlaceholder(): string
Gets current value of property placeholder.

Text shown when no value available.

Returns:
{string} Value of property placeholder
getShowLabel(): boolean
Gets current value of property showLabel.

If set to false the label is not displayed.

Default value is true.

Returns:
{boolean} Value of property showLabel
getShowSuggestion(): boolean
Gets current value of property showSuggestion.

If set to true, the suggestion feature for a hosted control is enabled, if the hosted control supports it.

Default value is true.

Returns:
{boolean} Value of property showSuggestion
getShowValueHelp(): boolean
Gets current value of property showValueHelp.

If set to true, a value help indicator will be displayed inside the hosted control, if the hosted control supports this.

Default value is true.

Returns:
{boolean} Value of property showValueHelp
getShowValueStateMessage(): boolean
Gets current value of property showValueStateMessage.

The text which is shown in the value state message popup.

Default value is true.

Returns:
{boolean} Value of property showValueStateMessage
getTextAlign(): sap.ui.core.TextAlign
Gets current value of property textAlign.

Horizontal alignment of the text.

Default value is Initial.

Returns:
{sap.ui.core.TextAlign} Value of property textAlign
getTextLabel(): string
Gets current value of property textLabel.

This property contains the text of an associated smart label.

Returns:
{string} Value of property textLabel
getTooltipLabel(): string
Gets current value of property tooltipLabel.

This property contains the tool tip of the associated smart label.

Returns:
{string} Value of property tooltipLabel
getUnitOfMeasure(): any
If the OData property to which the control's value property is bound semantically represents a unit of measure, the value of the current unit of measure is returned. Otherwise null is returned.
Returns:
{any} The current unit of measure is returned, which can be null
getUomEditable(): boolean
Gets current value of property uomEditable.

Editable state of the unit, if the SmartField control addresses unit of measure use cases, for example, an amount and its associated currency.

Default value is true.

Returns:
{boolean} Value of property uomEditable
getUomEditState(): int
Gets current value of property uomEditState.

This property is for internal use only.

Default value is -1.

Since:
1.31.0
Returns:
{int} Value of property uomEditState
getUomEnabled(): boolean
Gets current value of property uomEnabled.

Enabled state of the unit, if the SmartField control addresses unit of measure use cases, for example, an amount and its associated currency.

Default value is true.

Returns:
{boolean} Value of property uomEnabled
getUomVisible(): boolean
Gets current value of property uomVisible.

Visible state of the unit, if the SmartField control addresses unit of measure use cases, for example, an amount and its associated currency.

Default value is true.

Returns:
{boolean} Value of property uomVisible
getUrl(): string
Gets current value of property url.

Contains a URL which is used to render a link. The link is rendered, if the OData property which the value property of the control is bound to is of type Edm.String and the Smart Field is in display mode.

Returns:
{string} Value of property url
getValue(): any
Returns the value of the value property.
Returns:
{any} The value of the property
getValueState(): sap.ui.core.ValueState
Getter for property valueState. Default value is None.
Returns:
{sap.ui.core.ValueState} The property value
getValueStateText(): string
Getter for property valueStateText. Default value is empty/undefined.
Returns:
{string} The property value
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

The width can be set to an absolute value.

Returns:
{sap.ui.core.CSSSize} Value of property width
getWrapping(): boolean
Gets current value of property wrapping.

Indicates whether the control break lines (in display mode) to prevent overflow.

Default value is true.

Since:
1.36.6
Returns:
{boolean} Value of property wrapping
removeAllAriaLabelledBy(): sap.ui.core.Control[]
Removes all the controls in the association named ariaLabelledBy.
Since:
1.34.2
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.Control
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
{int|string|sap.ui.core.Control}vAriaLabelledBy The ariaLabelledByto be removed or its index or ID
Since:
1.34.2
Returns:
{sap.ui.core.Control} the removed ariaLabelledBy or null
setClientSideMandatoryCheck(bClientSideMandatoryCheck): sap.ui.comp.smartfield.SmartField
Sets a new value for property clientSideMandatoryCheck.

Determines if the mandatory check happens on the client side true or on the server side false.

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

Default value is true.

Parameters:
{boolean}bClientSideMandatoryCheck New value for property clientSideMandatoryCheck
Since:
1.38.3
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setConfiguration(oConfiguration): sap.ui.comp.smartfield.SmartField
Sets the aggregated configuration.
Parameters:
{sap.ui.comp.smartfield.Configuration}oConfiguration The configuration to set
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setContextEditable(bValue): sap.ui.comp.smartfield.SmartField
Setter for property contextEditable. Default value is false.
Parameters:
{boolean}bValue New value for property editable
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setControlContext(sControlContext): sap.ui.comp.smartfield.SmartField
Sets a new value for property controlContext.

Defines in which context the layout of the smart field has to be interpreted.

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

Default value is None.

Parameters:
{sap.ui.comp.smartfield.ControlContextType}sControlContext New value for property controlContext
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setEditable(bValue): sap.ui.comp.smartfield.SmartField
Setter for property editable. Default value is false.
Parameters:
{boolean}bValue New value for property editable
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
Setter for property enabled. Default value is true.
Parameters:
{boolean}bValue The new value for property enabled.
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setEntitySet(sValue): sap.ui.comp.smartfield.SmartField
Setter for property entitySet. Default value is undefined.
Parameters:
{string}sValue The new value for property entitySet
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setMandatory(bMandatory): sap.ui.comp.smartfield.SmartField
Sets a new value for property mandatory.

Mandatory property.

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

Default value is false.

Parameters:
{boolean}bMandatory New value for property mandatory
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setMaxLength(iMaxLength): sap.ui.comp.smartfield.SmartField
Sets a new value for property maxLength.

Maximum number of characters. Value 0 means the feature is switched off.

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

Default value is 0.

Parameters:
{int}iMaxLength New value for property maxLength
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
Sets a new value for property name.

To be used in the HTML code (for example, for HTML forms that send data to the server via 'submit').

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

Parameters:
{string}sName New value for property name
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setPlaceholder(sPlaceholder): sap.ui.comp.smartfield.SmartField
Sets a new value for property placeholder.

Text shown when no value available.

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

Parameters:
{string}sPlaceholder New value for property placeholder
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setShowLabel(bShowLabel): sap.ui.comp.smartfield.SmartField
Sets a new value for property showLabel.

If set to false the label is not displayed.

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

Default value is true.

Parameters:
{boolean}bShowLabel New value for property showLabel
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setShowSuggestion(bShowSuggestion): sap.ui.comp.smartfield.SmartField
Sets a new value for property showSuggestion.

If set to true, the suggestion feature for a hosted control is enabled, if the hosted control supports it.

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

Default value is true.

Parameters:
{boolean}bShowSuggestion New value for property showSuggestion
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setShowValueHelp(bShowValueHelp): sap.ui.comp.smartfield.SmartField
Sets a new value for property showValueHelp.

If set to true, a value help indicator will be displayed inside the hosted control, if the hosted control supports this.

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

Default value is true.

Parameters:
{boolean}bShowValueHelp New value for property showValueHelp
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setShowValueStateMessage(bShowValueStateMessage): sap.ui.comp.smartfield.SmartField
Sets a new value for property showValueStateMessage.

The text which is shown in the value state message popup.

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

Default value is true.

Parameters:
{boolean}bShowValueStateMessage New value for property showValueStateMessage
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setTextAlign(sTextAlign): sap.ui.comp.smartfield.SmartField
Sets a new value for property textAlign.

Horizontal alignment of the text.

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

Default value is Initial.

Parameters:
{sap.ui.core.TextAlign}sTextAlign New value for property textAlign
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setTextLabel(sTextLabel): sap.ui.comp.smartfield.SmartField
Sets a new value for property textLabel.

This property contains the text of an associated smart label.

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

Parameters:
{string}sTextLabel New value for property textLabel
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setTooltipLabel(sTooltipLabel): sap.ui.comp.smartfield.SmartField
Sets a new value for property tooltipLabel.

This property contains the tool tip of the associated smart label.

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

Parameters:
{string}sTooltipLabel New value for property tooltipLabel
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setUnitOfMeasure(sUnit)
If the OData property the control's value property is bound to semantically represents a unit of measure, the value of the current unit of measure can be changed.
Parameters:
{string}sUnit The new unit of measure to be set.
setUomEditable(bUomEditable): sap.ui.comp.smartfield.SmartField
Sets a new value for property uomEditable.

Editable state of the unit, if the SmartField control addresses unit of measure use cases, for example, an amount and its associated currency.

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

Default value is true.

Parameters:
{boolean}bUomEditable New value for property uomEditable
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setUomEditState(iUomEditState): sap.ui.comp.smartfield.SmartField
Sets a new value for property uomEditState.

This property is for internal use only.

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

Default value is -1.

Parameters:
{int}iUomEditState New value for property uomEditState
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setUomEnabled(bUomEnabled): sap.ui.comp.smartfield.SmartField
Sets a new value for property uomEnabled.

Enabled state of the unit, if the SmartField control addresses unit of measure use cases, for example, an amount and its associated currency.

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

Default value is true.

Parameters:
{boolean}bUomEnabled New value for property uomEnabled
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setUomVisible(bUomVisible): sap.ui.comp.smartfield.SmartField
Sets a new value for property uomVisible.

Visible state of the unit, if the SmartField control addresses unit of measure use cases, for example, an amount and its associated currency.

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

Default value is true.

Parameters:
{boolean}bUomVisible New value for property uomVisible
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
Setter for property url. Default value is null.
Parameters:
{string}sValue The new value for property url
Since:
1.29
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
Setter for property value. Default value is true.
Parameters:
{object}oValue The new value for property value
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setValueState(sValueState): sap.ui.comp.smartfield.SmartField
Setter for property valueState. Default value is None.
Parameters:
{sap.ui.core.ValueState}sValueState The new value for property valueState
Since:
1.30.0
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setValueStateText(sText): sap.ui.comp.smartfield.SmartField
Setter for property valueStateText. Default value is empty/undefined.
Parameters:
{string}sText The new value for property valueStateText
Since:
1.29
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setVisible(bValue, bSuppressInvalidate): sap.ui.comp.smartfield.SmartField
Setter for property visible. Default value is true.
Parameters:
{boolean}bValue New value for property editable
{boolean}bSuppressInvalidate If true, the managed object is not marked as changed
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
Setter for property width.
Parameters:
{string}sWidth The new value for property width
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
setWrapping(bWrapping): sap.ui.comp.smartfield.SmartField
Setter for property wrapping. The wrapping is only relevant for the table control context.
Parameters:
{boolean}bWrapping The new value for property wrapping
Returns:
{sap.ui.comp.smartfield.SmartField}this to allow method chaining
destroyControlProposal(): sap.ui.comp.smartfield.SmartField
Destroys the controlProposal in the aggregation controlProposal.
Deprecated:
Since 1.34.0
Since:
1.32.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
Gets content of aggregation controlProposal.

Proposes a control to be rendered. The smart field may ignore the proposal.

Deprecated:
Since 1.34.0
Since:
1.32.0
Returns:
{sap.ui.comp.smartfield.ControlProposal}
Gets current value of property jsontype.

Data types to be used, if the SmartField control is interacting with a JSON model. If the value property of the control is bound to a property of an OData entity set, this property is not considered.

Deprecated:
Since 1.31.0
Returns:
{sap.ui.comp.smartfield.JSONType} Value of property jsontype
Gets current value of property proposedControl.

Proposes a control to be rendered. The smart field may ignore the proposal.

Default value is None.

Deprecated:
Since 1.32.0
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.ControlProposalType} Value of property proposedControl
setControlProposal(oControlProposal): sap.ui.comp.smartfield.SmartField
Sets the aggregated controlProposal.
Parameters:
{sap.ui.comp.smartfield.ControlProposal}oControlProposal The controlProposal to set
Deprecated:
Since 1.34.0
Since:
1.32.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setJsontype(sJsontype): sap.ui.comp.smartfield.SmartField
Sets a new value for property jsontype.

Data types to be used, if the SmartField control is interacting with a JSON model. If the value property of the control is bound to a property of an OData entity set, this property is not considered.

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

Parameters:
{sap.ui.comp.smartfield.JSONType}sJsontype New value for property jsontype
Deprecated:
Since 1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
setProposedControl(sProposedControl): sap.ui.comp.smartfield.SmartField
Sets a new value for property proposedControl.

Proposes a control to be rendered. The smart field may ignore the proposal.

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

Default value is None.

Parameters:
{sap.ui.comp.smartfield.ControlProposalType}sProposedControl New value for property proposedControl
Deprecated:
Since 1.32.0
Since:
1.31.0
Returns:
{sap.ui.comp.smartfield.SmartField} Reference to this in order to allow method chaining
OData Annotation Detail
(Edm)
Based on the data type the SmartField determines the rendering of the inner control. Additionally the FieldControl is used. FieldControl is an annotation that contains a collection of EnumMembers that can dynamically set the state of the control. Controls used for the SmartField control during runtime are:
  • sap.m.Input of type Edm.String without value help.
    Used if control is editable and the EntityType is updatable.
  • sap.m.Input of type Edm.String with value help and suggestion list.
    Used if control is editable, the EntityType is updatable, and a ValueHelp annotations exists.

Refer OData v4 annotations for details about annotations.
FieldControl(com.sap.vocabularies.Common.v1)
Defines whether the control is visible. A fixed or dynamic value can be provided as an enumeration by referencing another Property within the same EntityType. Whenever the value of the referenced property changes to 0 or greater than 0, the visibility is changed. The property visible of the SmartField control can be used to handle the visibility of the control.

XML Example of OData V4 with Hidden Customer and CompanyCode Properties

   <Property Name="Customer">
     <Annotation Term="com.sap.vocabularies.Common.v1.FieldControl" Path="FieldControlValue" />
   </Property>
   <Property Name="CompanyCode">
     <Annotation Term="com.sap.vocabularies.Common.v1.FieldControl" Path="FieldControlValue" />
   </Property>
   <Property Name="FieldControlValue" type="Edm.Byte" />

For OData v2 the sap:visible annotation on the Property can be used to assign visibility.

   <Property Name="Customer" ... sap:visible="false"/>
   <Property Name="CompanyCode" ... sap:visible="false"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Record
Applies to Aggregation/Property:
fieldItem/#/visible
Since:
1.28.1
FieldControl(com.sap.vocabularies.Common.v1)
Defines whether the control is read-only. The value can be provided as a fixed or dynamic value of an enumeration by referencing another Property within the same EntityType. Whenever the value of the referenced property changes to 1 or greater than 1, the editability is changed. The editable property of the SmartField control renders the field as editable input. A SmartField is only editable if the corresponding EntityType is at least annotated as com.sap.vocabularies.Common.v1.Updatable.

XML Example of OData V4 with Read-only Customer and CompanyCode Properties

   <Property Name="Customer">
     <Annotation Term="com.sap.vocabularies.Common.v1.FieldControl" Path="FieldControlValue" />
   </Property>
   <Property Name="CompanyCode">
     <Annotation Term="FieldControl" Path="FieldControlValue" />
   </Property>
   <Property Name="com.sap.vocabularies.Common.v1.FieldControlValue" type="Edm.Byte" />

For OData v2 the sap:updatable annotation on the Property can be used to render fields in read-only mode.

   <Property Name="Customer" ... sap:updatable="false"/>
   <Property Name="CompanyCode" ... sap:updatable="false"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Record
Applies to Aggregation/Property:
fieldItem/#/editable
Since:
1.28.1
FieldControl(com.sap.vocabularies.Common.v1)
Defines whether the control is mandatory. The value can be provided as a fixed or dynamic value of an enumeration by referencing another Property within the same EntityType. Whenever the value of the referenced property changes to 7 or less than 7, the mandatory state is changed. The mandatory property of the SmartField control renders the field as mandatory input. A SmartField can only be mandatory if the corresponding EntityType is at least annotated as com.sap.vocabularies.Common.v1.Updatable.

XML Example of OData V4 with Mandatory Customer and CompanyCode Properties

   <Property Name="Customer">
     <Annotation Term="com.sap.vocabularies.Common.v1.FieldControl" Path="FieldControlValue" />
   </Property>
   <Property Name="CompanyCode">
     <Annotation Term="com.sap.vocabularies.Common.v1.FieldControl" Path="FieldControlValue" />
   </Property>
   <Property Name="FieldControlValue" type="Edm.Byte" />

For OData v2 the sap:field-control annotation on the Property can be used to specify whether the field is mandatory.

   <Property Name="Customer" ... sap:field-control="mandatory"/>
   <Property Name="CompanyCode" ... sap:field-control="mandatory"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Record
Applies to Aggregation/Property:
fieldItem/#/editable
Since:
1.28.1
Masked(com.sap.vocabularies.Common.v1)
Determines that a control must not display the actual value in a field with sensitive data, but replace it with a placeholder, for example, *. Use this annotation for sensitive data.

XML Example of OData V4 with Masked Password property

  <Property Name="Password" />
  <Annotations Target="Password" xmlns="http://docs.oasis-open.org/odata/ns/edm">
    <Annotation Term="com.sap.vocabularies.Common.v1.Masked" />
  </Annotations>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.28.1
Label(com.sap.vocabularies.Common.v1)
A short, human-readable text suitable for labels on user interfaces. Renders the value associated with the label annotation of a Property, which can be null.

XML Example of OData V4 with CustomerName as Label for Customer

  <Property Name="Customer">
    <Annotation Term="com.sap.vocabularies.Common.v1.Label" Path="CustomerName" />
  </Property>
  <Property Name="CustomerName" type="Edm.String" />

For OData v2 the sap:label annotation on the Property can be used to assign a label.

   <Property Name="Customer" ... sap:label="Customer Name"/>
   <Property >ame="CompanyCode" ... sap:label="Company Code"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
PropertyPath
Applies to Aggregation/Property:
fieldItem/#/label
Since:
1.28.1
Text(com.sap.vocabularies.Common.v1)
A descriptive text for values of the annotated property. Note: The value must be a dynamic expression when used as metadata annotation.

XML Example of OData V4 Text on CustomerName Property

   <Property Name="Customer">
     <Annotation Term="com.sap.vocabularies.Common.v1.Text" Path="CustomerName" />
   </Property>
   <Property Name="CustomerName" type="Edm.String" />

For OData v2 the sap:text annotation on the Property can be used to assign text.

   <Property Name="Customer" ... sap:text="CustomerName"/>
   <Property Name="CustomerName" type="Edm.String"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.28.1
TextArrangement(com.sap.vocabularies.UI.v1)
Describes the arrangement of a code value and its text. The value can be a fixed or dynamic value of an enumeration by referencing another Property within the same EntityType. The enumeration members can have the following possible values:
  • com.sap.vocabularies.UI.v1.TextArrangementType/TextFirst
    The underlying control is represented with the specified description followed by its ID.
  • com.sap.vocabularies.UI.v1.TextArrangementType/TextLast
    The underlying control is represented with the specified ID followed by its description.
XML Example of OData V4 with TextArrangement on ProductType

   <Annotations Target="ProductType">
     <Annotation Term="com.sap.vocabularies.UI.v1.TextArrangement" EnumMember="UI.TextArrangementType/TextFirst"/>
   </Annotations>

Refer OData v4 annotations for details about annotations.
Target Type:
EntityType
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.32.1
ISOCurrency(Org.OData.Measures.V1)
Defines a currency code for an amount according to the ISO 4217 standard. ISOCurrency annotation can point to a Property, which can also be null.

XML Example of OData V4 with Price and CurrencyCode as ISOCurrency

   <Property Name="Price">
      <Annotation Term="Org.OData.Measures.V1.ISOCurrency" Path="CurrencyCode" />
   </Property>
   <Property Name="CurrencyCode" type="Edm.String" />

For OData v2 the sap:semantics="currency-code" along with sap:unit annotations on the Property can be used to assign a currency code to the field.

   <Property Name="Price" ... sap:unit="CurrencyCode"/>
   <Property Name="CurrencyCode" ... sap:semantics="currency-code"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.28.1
Unit(Org.OData.Measures.V1)
The unit of measure for this measured quantity, for example, cm for centimeters. Renders the value associated with the unit annotation of a Property, which can be null.

XML Example of OData V4 with OrderedQuantity and OrderedUnit as Unit

   <Property Name="OrderedQuantity">
      <Annotation Term="Org.OData.Measures.V1.Unit" Path="OrderedUnit" />
   </Property>
   <Property Name="OrderedUnit" type="Edm.String" />

For OData v2 the sap:semantics="unit-of-measure" along with sap:unit annotations on the Property can be used to assign a unit of measure to the field.

   <Property Name="OrderedQuantity" ... sap:unit="OrderedUnit"/>
   <Property Name="OrderedUnit" ... sap:semantics="unit-of-measure"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.28.1
Scale(Org.OData.Measures.V1)
Defines the number of digits that are to be displayed after the decimal point. This annotation can be applied to a Property.

XML Example of OData V4 with Scaled Price and Weight Properties

   <Property Name="Price">
      <Annotation Term="Org.OData.Measures.V1.Scale" Path="PriceScale" />
   </Property>
   <Property Name="Weight">
      <Annotation Term="Org.OData.Measures.V1.Scale" Path="WeightScale" />
   </Property>
   <Property Name="PriceScale" type="Edm.Byte" />
   <Property Name="WeightScale" type="Edm.Byte" />

For OData v2 the sap:precision annotation on the Property can be used to scale the number of digits to be displayed after the decimal point.

   <Property Name="Price" ... sap:precision="2"/>
   <Property Name="Weight" ... sap:precision="3"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.28.1
QuickInfo(com.sap.vocabularies.Common.v1)
A short, human-readable text suitable for tool tips in user interfaces.

XML Example of OData V4 with Tooltip on CompanyCode Property

   <Property Name="CompanyCode">
     <Annotation Term="com.sap.vocabularies.Common.v1.QuickInfo" Path="CompanyCodeQuickInfo" />
   </Property>
   <Property Name="CompanyQuickInfo" type="Edm.String" />

For OData v2 the sap:quickinfo annotation on the Property can be used to assign information relevant for tool tips of the field.

   <Property Name="CompanyCode" ... sap:quickinfo="Company Code quickinfo"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/tooltip
Since:
1.28.1
MultiLineText(com.sap.vocabularies.UI.v1)
Properties annotated with this annotation are rendered as multi-line text (for example, text area).

XML Example of OData V4 with Multi-line Text Description Property

   <Property Name="Description" />
   <Annotations Target="Description">
      <Annotation Term="com.sap.vocabularies.UI.v1.MultiLineText" />
   </Annotations>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
PropertyPath
Applies to Aggregation/Property:
fieldItem/#/control
Since:
1.28.1
IsUpperCase(com.sap.vocabularies.Common.v1)
Defines whether a string value is capitalized.

XML Example of OData V4 with Capitalized Customer and CompanyCode Properties

   <Annotation Term="com.sap.vocabularies.Common.v1.IsUpperCase">
       <Collection>
          <PropertyPath>Customer</PropertyPath>
          <PropertyPath>CompanyCode</PropertyPath>
       </Collection>
   </Annotation>

For OData v2 the sap:display-format="UpperCase" annotation on the Property can be used to render the text in upper case format.

   <Property Name="Customer" ... sap:display-format="UpperCase"/>
   <Property Name="CompanyCode" ... sap:display-format="UpperCase"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Parameter
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.28.1
InsertRestrictions/Insertable(Org.OData.Capabilities.V1)
Defines whether an EntitySet can be created.

XML Example of OData V4 with Insertable ProductCollection EntitySet

  <EntitySet Name="ProductCollection">
    <Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
      <Record>
        <PropertyValue Property="Insertable" Bool="true" />
      </Record>
    </Annotation>
  </EntitySet>

For OData v2 the sap:creatable annotation on the Property can be used to specify that the field is creatable.

   <Property Name="Customer" ... sap:creatable="true"/>
   <Property Name="CompanyCode" ... sap:creatable="true"/>

Refer OData v4 annotations for details about annotations.
Target Type:
EntitySet
Applies to Aggregation/Property:
fieldItem/#/editable
Since:
1.28.1
Computed(Org.OData.Core.V1)
Defines whether a Property can be created. A value for this Property is generated on both insert and update actions.

XML Example of OData V4 with Computed Customer and CompanyCode Properties

   <Annotation Term="Org.OData.Core.V1.Computed">
       <Collection>
          <PropertyPath>Customer</PropertyPath>
          <PropertyPath>CompanyCode</PropertyPath>
       </Collection>
   </Annotation>

For OData v2 the sap:creatable and sap:updatable annotation on the Property can be used to specify whether a value has to be created on insert and update actions.

   <Property Name="Customer" ... sap:creatable="true"/>
   <Property Name="CompanyCode" ... sap:creatable="true"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/editable
Since:
1.28.1
UpdateRestrictions/Updatable(Org.OData.Capabilities.V1)
Defines whether an EntitySet can be updated.

XML Example of OData V4 with Updatable ProductCollection EntitySet

  <EntitySet Name="ProductCollection">
    <Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
      <Record>
        PropertyValue Property="Updatable" Bool="true" />
      </Record>
    </Annotation>
  </EntitySet>

For OData v2 the sap:updatable annotation on the Property can be used to specify whether a field is updatable.

   <Property Name="Customer" ... sap:updatable="true"/>
   <Property Name="CompanyCode" ... sap:updatable="true"/>

Refer OData v4 annotations for details about annotations.
Target Type:
EntitySet
Applies to Aggregation/Property:
fieldItem/#editable
Since:
1.28.1
Immutable(Org.OData.Core.V1)
A value for this non-key property can be provided on insert and cannot even be changed on update actions.

XML Example of OData V4 with Immutable Customer and CompanyCode properties

   <Annotation Term="Org.OData.Core.V1.Immutable">
       <Collection>
          <PropertyPath>Customer</PropertyPath>
          <PropertyPath>CompanyCode</PropertyPath>
       </Collection>
   </Annotation>

For OData v2 the sap:updatable and sap:creatable annotation on the Property can be used to avoid changes that can be done on update actions.

   <Property Name="Customer" ... sap:creatable="false"/>
   <Property Name="CompanyCode" ... sap:creatable="false"/>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Applies to Aggregation/Property:
fieldItem/#/editable
Since:
1.28.1
SideEffects(com.sap.vocabularies.Common.v1)
Changes to the source properties may have side-effects on the target properties or entities. If neither TargetProperties nor TargetEntities are specified, a change to the source property values may have unforeseeable side-effects. An empty NavigationPropertyPath may be used in TargetEntities to specify that any property of the annotated entity type may be affected. Actions are a special case: here the change trigger is the action invocation, so SourceProperties and SourceEntities have no meaning, only TargetProperties and TargetEntities are relevant. They are addressed via the binding parameter of the action. SideEffects can be associated with the given entity, which can be a complex type, entity type or entity set. In addition to this, SideEffects can also be applied to a PropertyPath or a NavigationPropertyPath of the given entity.

XML Example of OData V4 with Side Effect on CurrencyCode Property

  <Annotation Term="com.sap.vocabularies.Common.v1.SideEffects" Qualifier="ExampleQualifierName">
    <Record>
      <PropertyValue Property="SourceProperties">
        <Collection>
          <PropertyPath>CurrencyCode</PropertyPath>
        </Collection>
      </PropertyValue>
      <PropertyValue Property="TargetProperties">
        <Collection>
          <PropertyPath>CurrencyCode</PropertyPath>
        </Collection>
      </PropertyValue>
      <PropertyValue Property="EffectTypes" EnumMember="ValidationMessage" />
    </Record>
  </Annotation>

Refer OData v4 annotations for details about annotations.
Target Type:
EntitySet
EntityType
ComplexType
Applies to Aggregation/Property:
fieldItem/#/value
Since:
1.32.1
ValueList(com.sap.vocabularies.Common.v1)
Specifies how to get a list of acceptable values for a property or parameter. Provides the value help dialog and type-ahead function.

XML Example of OData V4 Value List on Category Property

   <Annotation Term="com.sap.vocabularies.Common.v1.ValueList">
     <Record>
       <PropertyValue Property="Label" String="Category" />
       <PropertyValue Property="CollectionPath" String="Category" />
       <PropertyValue Property="SearchSupported" Bool="true" />
       <PropertyValue Property="Parameters">
         <Collection>
           <Record Type="com.sap.vocabularies.Common.v1.ValueListParameterOut">
             <PropertyValue Property="LocalDataProperty" PropertyPath="Category" />
             <PropertyValue Property="ValueListProperty" String="Description" />
           </Record>
           <Record Type="com.sap.vocabularies.Common.v1.ValueListParameterDisplayOnly">
             <PropertyValue Property="ValueListProperty" String="CategoryName" />
           </Record>
         </Collection>
       </PropertyValue>
     </Record>
   </Annotation>

Refer OData v4 annotations for details about annotations.
Target Type:
Property
Parameter
Applies to Aggregation/Property:
field/#/fieldHelp
Since:
1.28.1