The SmartField
control interprets metadata that represents entity-relationship models, data types, service capabilities, and annotations in OData services to automatically generate the underlying inner controls and reduce the amount of code needed for developing applications. In some cases, 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.
Important: Keep in mind that SmartField
, like all SAPUI5 smart controls, retrieves and analyzes the metadata and annotations of OData services. The OData metadata is its primary API. These OData services are not part of the SAPUI5 framework and are usually maintained by the backend developers of your application.
With time, SmartField
can evolve and acquire new features. This means that its behavior or functionalities may change if the annotations that define this change are maintained in your backend metadata. To benefit from the new functionalities, your application should be able to adapt the backend metadata. Therefore, we recommend using SmartField
only if you have control over the metadata of your application.
For interoperability and accessibility reasons, the SmartField
control must be labeled by the sap.ui.comp.smartfield.SmartLabel
control instead of the sap.m.Label
control, as the sap.m.Label
control does not know of the inner structure of a SmartField
control. If the SmartField
control is rendered inside a smart container control, for example, the SmartForm
control, the SmartLabel
control is automatically generated to reduce the amount of code needed on the application side. However, in other scenarios when SmartField
is used stand-alone or outside a smart container control, for example, a SimpleForm
control, the SmartLabel
control is not automatically generated in these cases. Although the sap.ui.comp.smartfield.SmartLabel
is a private/internal control, the following basic use is allowed by applications for labeling the SmartField
control.
XML Example of a SmartField
control labeled by a SmartLabel
control
<sap.ui.comp.smartfield.SmartLabel labelFor="IDProduct"/> <sap.ui.comp.smartfield.SmartField id="IDProduct" value="{ProductId}"/>
Note: Using the SmartLabel
control on its own is not recommended. Only basic usage is allowed which does not include automatic handling of visibility. If used stand-alone, the application logic must take care of the visibility of the label.
Constructor for a new sap.ui.comp.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#constructor for a general description of the syntax of the settings object.
new sap.ui.comp.smartfield.SmartField(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
clientSideMandatoryCheck | boolean | true | Determines if the mandatory check happens on the client side Note: If the sap.ui.comp.smartfield.SmartField#value property of the Example: <Property Name="CategoryID" Type="Edm.String" Nullable="false"/> Since: 1.38.3.Visibility: public |
contextEditable | boolean | true | Notifies the control whether controls using the |
controlContext | sap.ui.comp.smartfield.ControlContextType | None | Defines the context in which the layout of the |
editable | boolean | true | Indicates whether the control is in display or edit mode. Note: The
|
enabled | boolean | true | Indicates whether the user can interact with the control or not. Note: Disabled controls cannot be focused and they are out of the tab order. Visibility: public |
entitySet | string | empty string | The name of an entity set for which the control manages values. This is an optional property. If this property is left empty, the entity set is computed by parsing the binding context path, for example, |
expandNavigationProperties | boolean | false | Indicates if entities related to navigation properties inside the metadata are requested. If set to Annotations that can have navigation properties are the following:
Note: Independent of the Note: The back-end request to expand the navigation properties is sent only if the entity to which |
fetchValueListReadOnly | boolean | true | Indicates whether the value list collection is fetched in display mode from the resource path specified in the This collection data is used to infer a descriptive text for the value of the Note: Setting this property to |
fixedValueListValidationEnabled | boolean | false | If the property is set to Note: If the property is set to Note: This property is applicable only for fixed-value scenarios. |
historyEnabled | boolean | true | If the property is set to Note: For sap.m.ComboBox and sap.m.MultiComboBox the history values are disabled by default. To enable them for these controls, you need to set the |
importance | sap.ui.comp.smartfield.Importance | Low | Specifies the importance of the field. Applicable only when the |
jsontype | sap.ui.comp.smartfield.JSONType | Data types to be used, if the |
|
mandatory | boolean | false | Indicates whether user input is required. Note: The
|
maxLength | int | 0 | Defines the highest possible number of permitted input characters that the user can enter into the text input field. Computed |
name | string | empty string | To be used in the HTML code (for example, for HTML forms that send data to the server via 'submit'). Visibility: public |
placeholder | string | empty string | Text shown when no value available. Visibility: public |
proposedControl | sap.ui.comp.smartfield.ControlProposalType | None | Proposes a control to be rendered. The |
showLabel | boolean | true | If set to |
showSuggestion | boolean | true | If set to |
showValueHelp | boolean | true | If set to |
showValueStateMessage | boolean | true | Defines whether the value state message is shown or not. Visibility: public |
textAlign | sap.ui.core.TextAlign | Initial | Horizontal alignment of the text. Visibility: public |
textDirection | sap.ui.core.TextDirection | Inherit | The available text direction options are LTR and RTL. By default, the control inherits the text direction from its parent control. The Note: The |
textInEditModeSource | sap.ui.comp.smartfield.TextInEditModeSource | None | Sets the source from which text descriptions for Note: The
Note: In addition, the
Note: As of version 1.82, if |
textLabel | string | empty string | This property contains the text of an associated |
tooltipLabel | string | empty string | This property contains the tool tip of the associated |
uomEditState | int | -1 | This property is for internal use only. |
uomEditable | boolean | true | Indicates whether the unit of measure field is in display or edit mode. Note: This control property is only valid if the
Note: The
|
uomEnabled | boolean | true | Enabled state of the unit, if the |
uomVisible | boolean | true | Indicates whether the unit of measure field is visible. Note: This control property is only valid if the
Note: The |
url | string | empty string | Contains a URL which is used to render a link. The link is rendered, if the OData property, to which the value property of the control is bound, is of type |
value | any | The binding path expression used to determine the bound Entity Data Model (EDM) property. Note: Composite binding expressions for this property are not supported. Note: Custom formatters for this property are not supported. The |
|
valueState | sap.ui.core.ValueState | None | Visualizes the validation state of the control, e.g. Note: This method is public because of an implementation side effect and should not be used for validation purposes as it may conflict with the Custom validation logic must be implemented in a custom binding type rather than in a |
valueStateText | string | empty string | Defines the text of the value state message popup. Note: This method is public because of an implementation side effect and should not be used for validation purposes as it may conflict with the Custom validation logic must be implemented in a custom binding type rather than in a |
width | sap.ui.core.CSSSize | empty string | Defines the width of the control. Visibility: public |
wrapping | boolean | true | Indicates whether the control break lines (in display mode) to prevent overflow. |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_ariaLabelInvisibleText | 0..n | sap.ui.core.InvisibleText |
Collects the texts to be used for the ARIA labels. |
_content | 0..1 | sap.ui.core.Control |
The content aggregation is used to hold the control that is hosted by the |
configuration | 0..1 | sap.ui.comp.smartfield.Configuration |
Optional configuration for Note: By default, the value of the |
controlProposal | 0..1 | sap.ui.comp.smartfield.ControlProposal |
Proposes a control to be rendered. The |
semanticObjectController | 0..1 | sap.ui.comp.navpopover.SemanticObjectController |
The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaDescribedBy | 0..n | sap.ui.core.Control |
Association to controls / IDs that describe this control (see WAI-ARIA attribute |
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which label this control (see WAI-ARIA attribute |
Event | Description |
---|---|
change |
The event is fired after the text in the field has been changed and the focus leaves the field, or after the Enter key has been pressed. Note: This event is fired even if the value of the text input field is subject to data type constraints and the constraints are violated. Also, the invalid value is not stored in the binding/model. |
changeModelValue |
Fired after the text in the field has been changed by user interaction in combination with one of the following actions:
If the value of the text input field is subject to data type constraints, the constraints must be fulfilled, which implies the value is stored in the binding/model before the event is fired. Note: The changeModelValue event is currently experimental and might be redefined. |
contextEditableChanged |
The event is fired after the context editable property of the control has changed. |
editableChanged |
The event is fired after the value of editable property of the control has changed. |
entitySetFound |
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. |
initialise |
The event is fired after the smart field has calculated its metadata. |
innerControlsCreated |
The event is fired after the inner controls have been created. |
press |
Fires when the user triggers the link control or taps/clicks on an active title of the object identifier control. |
valueListChanged |
The event is fired when after selection of values with value help or auto-suggest, the model is updated with the selected data. |
visibleChanged |
The event is fired after the visibility of the control has changed. |
The event is fired after the text in the field has been changed and the focus leaves the field, or after the Enter key has been pressed.
Note: This event is fired even if the value of the text input field is subject to data type constraints and the constraints are violated. Also, the invalid value is not stored in the binding/model.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
value | string |
The current value inside the text field Note: This value is the formatted value, and in some cases it might differ from the value stored in the binding/model. Usually, the value that is sent to the back-end system should be the value stored in the binding/model, which is the parsed and validated value. |
newValue | string |
The new value inside the text field |
Fired after the text in the field has been changed by user interaction in combination with one of the following actions:
ValueHelpDialog
If the value of the text input field is subject to data type constraints, the constraints must be fulfilled, which implies the value is stored in the binding/model before the event is fired.
Note: The changeModelValue event is currently experimental and might be redefined.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
valueChanged | boolean |
Indicates whether the field quantity field has changed |
valueLastValueState | boolean |
Last value of the |
unitChanged | boolean |
Indicates whether the field unit field has changed |
unitLastValueState | sap.ui.core.ValueState |
Last value of the |
The event is fired after the context editable property of the control has changed.
Since: 1.32.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
editable | boolean |
The value of the context editable property of the control |
The event is fired after the value of editable property of the control has changed.
Since: 1.30.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
editable | boolean |
If |
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.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
entitySet | string |
The path to the found entity set |
The event is fired after the smart field has calculated its metadata.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
The event is fired after the inner controls have been created.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Fires when the user triggers the link control or taps/clicks on an active title of the object identifier control.
Since: 1.36.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
The event is fired when after selection of values with value help or auto-suggest, the model is updated with the selected data.
Since: 1.31.0.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
changes | sap.ui.core.Control[] |
An array of selected values |
Method | Description |
---|---|
addAriaDescribedBy |
Adds some ariaDescribedBy into the association ariaDescribedBy. |
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
attachChange |
Attaches event handler When called, the context of the event handler (its The event is fired after the text in the field has been changed and the focus leaves the field, or after the Enter key has been pressed. Note: This event is fired even if the value of the text input field is subject to data type constraints and the constraints are violated. Also, the invalid value is not stored in the binding/model. |
attachChangeModelValue |
Attaches event handler When called, the context of the event handler (its Fired after the text in the field has been changed by user interaction in combination with one of the following actions:
If the value of the text input field is subject to data type constraints, the constraints must be fulfilled, which implies the value is stored in the binding/model before the event is fired. Note: The changeModelValue event is currently experimental and might be redefined. |
attachContextEditableChanged |
Attaches event handler When called, the context of the event handler (its The event is fired after the context editable property of the control has changed. |
attachEditableChanged |
Attaches event handler When called, the context of the event handler (its The event is fired after the value of editable property of the control has changed. |
attachEntitySetFound |
Attaches event handler When called, the context of the event handler (its 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. |
attachInitialise |
Attaches event handler When called, the context of the event handler (its The event is fired after the smart field has calculated its metadata. |
attachInnerControlsCreated |
Attaches event handler When called, the context of the event handler (its The event is fired after the inner controls have been created. |
attachPress |
Attaches event handler When called, the context of the event handler (its Fires when the user triggers the link control or taps/clicks on an active title of the object identifier control. |
attachValueListChanged |
Attaches event handler When called, the context of the event handler (its The event is fired when after selection of values with value help or auto-suggest, the model is updated with the selected data. |
attachVisibleChanged |
Attaches event handler When called, the context of the event handler (its The event is fired after the visibility of the control has changed. |
checkClientError |
Checks whether a client error has been detected in edit mode. Additionally the error message is shown, if this is not the case already. This method is typically used to check whether the value of every inner text input field in edit mode is subject to data type constraints and whether the constraints are fulfilled. A data type constraint for a bound Entity Data Model (EDM) property can be violated in many ways, for example:
If this happens, the following applies:
Since 1.64 replaced by {@link sap.ui.comp.smartfield.SmartField#checkValuesValidity}
|
checkUnitValidity |
Checks the validity of the values for the given control. |
checkValuesValidity |
Checks whether the value of every inner text input field in edit mode is valid. This method is typically used to check whether the value of every inner text input field in edit mode is subject to data type constraints and whether the constraints are fulfilled. Note: In some scenarios, invoking this method may also trigger a back-end request to check whether the value is valid. A data type constraint for a bound Entity Data Model (EDM) property can be violated in many ways, for example:
If this happens, the following applies:
The inner private text input field fires a sap.ui.base.EventProvider#event:validationSuccess if its validation passes. Note: In display mode, this method always returns a fulfilled Note: In two-way data binding scenarios, it is usually not necessary to invoke this method explicitly to validate user input, as the data type validation is done automatically when the value in the input field has changed and the focus leaves the text input field or the enter key is pressed. However, in two-way data binding scenarios, this method may be used to check whether a value is valid before submitting it to the back-end system. |
destroyConfiguration |
Destroys the configuration in the aggregation configuration. |
destroyControlProposal |
Destroys the controlProposal in the aggregation controlProposal. |
destroySemanticObjectController |
Destroys the semanticObjectController in the aggregation semanticObjectController. |
detachChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachChangeModelValue |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachContextEditableChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachEditableChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachEntitySetFound |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachInitialise |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachInnerControlsCreated |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachValueListChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachVisibleChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.comp.smartfield.SmartField.extend |
Creates a new subclass of class sap.ui.comp.smartfield.SmartField with name
|
fireChange |
Fires event change to attached listeners. |
fireChangeModelValue |
Fires event changeModelValue to attached listeners. |
fireContextEditableChanged |
Fires event contextEditableChanged to attached listeners. |
fireEditableChanged |
Fires event editableChanged to attached listeners. |
fireEntitySetFound |
Fires event entitySetFound to attached listeners. |
fireInitialise |
Fires event initialise to attached listeners. |
fireInnerControlsCreated |
Fires event innerControlsCreated to attached listeners. |
firePress |
Fires event press to attached listeners. |
fireValueListChanged |
Fires event valueListChanged to attached listeners. |
fireVisibleChanged |
Fires event visibleChanged to attached listeners. |
getAriaDescribedBy |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy. |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getClientSideMandatoryCheck |
Gets current value of property clientSideMandatoryCheck. Determines if the mandatory check happens on the client side Note: If the sap.ui.comp.smartfield.SmartField#value property of the Example: <Property Name="CategoryID" Type="Edm.String" Nullable="false"/> Default value is |
getComputedTextLabel | |
getConfiguration |
Gets content of aggregation configuration. Optional configuration for Note: By default, the value of the |
getContextEditable |
Gets current value of property contextEditable. Notifies the control whether controls using the Default value is |
getControlContext |
Gets current value of property controlContext. Defines the context in which the layout of the Default value is |
getControlProposal |
Gets content of aggregation controlProposal. Proposes a control to be rendered. The |
getDataProperty |
Returns the OData property to which the |
getDataSourceLabel |
Returns the label computed from the SmartField annotations if available |
getDataType |
Returns the EDM data type of the OData property to which the value property of the control is bound. If no model or no OData property is available |
getEditable |
Gets current value of property editable. Indicates whether the control is in display or edit mode. Note: The
Default value is |
getEnabled |
Gets current value of property enabled. Indicates whether the user can interact with the control or not. Note: Disabled controls cannot be focused and they are out of the tab order. Default value is |
getEntitySet |
Gets current value of property entitySet. The name of an entity set for which the control manages values. This is an optional property. If this property is left empty, the entity set is computed by parsing the binding context path, for example, Default value is |
getExpandNavigationProperties |
Gets current value of property expandNavigationProperties. Indicates if entities related to navigation properties inside the metadata are requested. If set to Annotations that can have navigation properties are the following:
Note: Independent of the Note: The back-end request to expand the navigation properties is sent only if the entity to which Default value is |
getFetchValueListReadOnly |
Gets current value of property fetchValueListReadOnly. Indicates whether the value list collection is fetched in display mode from the resource path specified in the This collection data is used to infer a descriptive text for the value of the Note: Setting this property to Default value is |
getFixedValueListValidationEnabled |
Gets current value of property fixedValueListValidationEnabled. If the property is set to Note: If the property is set to Note: This property is applicable only for fixed-value scenarios. Default value is |
getFocusDomRef |
Returns the DOM element that gets the focus. |
getFormFormattedValue |
Returns the formatted value of a control used in a |
getFormValueProperty |
Returns the name of the value-holding property of a control used in a |
getHistoryEnabled |
Gets current value of property historyEnabled. If the property is set to Note: For sap.m.ComboBox and sap.m.MultiComboBox the history values are disabled by default. To enable them for these controls, you need to set the Default value is |
getIdForLabel |
Gets the ID of the control to which the label should point. |
getImportance |
Gets current value of property importance. Specifies the importance of the field. Applicable only when the Default value is |
getInnerControls |
Resolves the controls hosted currently by this |
getJsontype |
Gets current value of property jsontype. Data types to be used, if the |
getMandatory |
Gets current value of property mandatory. Indicates whether user input is required. Note: The
Default value is |
getMaxLength |
Gets current value of property maxLength. Defines the highest possible number of permitted input characters that the user can enter into the text input field. Computed |
sap.ui.comp.smartfield.SmartField.getMetadata |
Returns a metadata object for class sap.ui.comp.smartfield.SmartField. |
getMode |
Returns the current SmartField's edit mode |
getName |
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'). Default value is |
getPlaceholder |
Gets current value of property placeholder. Text shown when no value available. Default value is |
getProposedControl |
Gets current value of property proposedControl. Proposes a control to be rendered. The Default value is |
getRequired |
Gets the value of the This function is needed as the "mandatory" feature is named "required" in a lot of other controls (like |
getSemanticObjectController |
Gets content of aggregation semanticObjectController. The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation. |
getShowLabel |
Gets current value of property showLabel. If set to Default value is |
getShowSuggestion |
Gets current value of property showSuggestion. If set to Default value is |
getShowValueHelp |
Gets current value of property showValueHelp. If set to Default value is |
getShowValueStateMessage |
Gets current value of property showValueStateMessage. Defines whether the value state message is shown or not. Default value is |
sap.ui.comp.smartfield.SmartField.getSupportedAnnotationPaths |
Calculates the paths to the annotations used by the |
getTextAlign |
Gets current value of property textAlign. Horizontal alignment of the text. Default value is |
getTextDirection |
Gets current value of property textDirection. The available text direction options are LTR and RTL. By default, the control inherits the text direction from its parent control. The Note: The Default value is |
getTextInEditModeSource |
Gets current value of property textInEditModeSource. Sets the source from which text descriptions for Note: The
Note: In addition, the
Note: As of version 1.82, if Default value is |
getTextLabel |
Gets current value of property textLabel. This property contains the text of an associated Default value is |
getTooltipLabel |
Gets current value of property tooltipLabel. This property contains the tool tip of the associated Default value is |
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. Otherwise |
getUomEditable |
Gets current value of property uomEditable. Indicates whether the unit of measure field is in display or edit mode. Note: This control property is only valid if the
Note: The
Default value is |
getUomEditState |
Gets current value of property uomEditState. This property is for internal use only. Default value is |
getUomEnabled |
Gets current value of property uomEnabled. Enabled state of the unit, if the Default value is |
getUomVisible |
Gets current value of property uomVisible. Indicates whether the unit of measure field is visible. Note: This control property is only valid if the
Note: The Default value is |
getUrl |
Gets current value of property url. Contains a URL which is used to render a link. The link is rendered, if the OData property, to which the value property of the control is bound, is of type Default value is |
getValue |
Gets current value of property value. The binding path expression used to determine the bound Entity Data Model (EDM) property. Note: Composite binding expressions for this property are not supported. Note: Custom formatters for this property are not supported. The |
getValueState |
Gets current value of property valueState. Visualizes the validation state of the control, e.g. Note: This method is public because of an implementation side effect and should not be used for validation purposes as it may conflict with the Custom validation logic must be implemented in a custom binding type rather than in a Default value is |
getValueStateText |
Gets current value of property valueStateText. Defines the text of the value state message popup. Note: This method is public because of an implementation side effect and should not be used for validation purposes as it may conflict with the Custom validation logic must be implemented in a custom binding type rather than in a Default value is |
getWidth |
Gets current value of property width. Defines the width of the control. Default value is |
getWrapping |
Gets current value of property wrapping. Indicates whether the control break lines (in display mode) to prevent overflow. Default value is |
removeAllAriaDescribedBy |
Removes all the controls in the association named ariaDescribedBy. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAriaDescribedBy |
Removes an ariaDescribedBy from the association named ariaDescribedBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
setClientSideMandatoryCheck |
Sets a new value for property clientSideMandatoryCheck. Determines if the mandatory check happens on the client side Note: If the sap.ui.comp.smartfield.SmartField#value property of the Example: <Property Name="CategoryID" Type="Edm.String" Nullable="false"/> When called with a value of Default value is |
setConfiguration |
Sets the aggregated configuration. |
setContextEditable |
Sets a new value for property contextEditable. Notifies the control whether controls using the When called with a value of Default value is |
setControlContext |
Sets a new value for property controlContext. Defines the context in which the layout of the When called with a value of Default value is |
setControlProposal |
Sets the aggregated controlProposal. |
setEditable |
Sets a new value for property editable. Indicates whether the control is in display or edit mode. Note: The
When called with a value of Default value is |
setEnabled |
Sets a new value for property enabled. Indicates whether the user can interact with the control or not. Note: Disabled controls cannot be focused and they are out of the tab order. When called with a value of Default value is |
setEntitySet |
Sets a new value for property entitySet. The name of an entity set for which the control manages values. This is an optional property. If this property is left empty, the entity set is computed by parsing the binding context path, for example, When called with a value of Default value is |
setExpandNavigationProperties |
Sets a new value for property expandNavigationProperties. Indicates if entities related to navigation properties inside the metadata are requested. If set to Annotations that can have navigation properties are the following:
Note: Independent of the Note: The back-end request to expand the navigation properties is sent only if the entity to which When called with a value of Default value is |
setFetchValueListReadOnly |
Sets a new value for property fetchValueListReadOnly. Indicates whether the value list collection is fetched in display mode from the resource path specified in the This collection data is used to infer a descriptive text for the value of the Note: Setting this property to When called with a value of Default value is |
setFixedValueListValidationEnabled |
Sets a new value for property fixedValueListValidationEnabled. If the property is set to Note: If the property is set to Note: This property is applicable only for fixed-value scenarios. When called with a value of Default value is |
setHistoryEnabled |
Sets a new value for property historyEnabled. If the property is set to Note: For sap.m.ComboBox and sap.m.MultiComboBox the history values are disabled by default. To enable them for these controls, you need to set the When called with a value of Default value is |
setImportance |
Sets a new value for property importance. Specifies the importance of the field. Applicable only when the When called with a value of Default value is |
setJsontype |
Sets a new value for property jsontype. Data types to be used, if the When called with a value of |
setMandatory |
Sets a new value for property mandatory. Indicates whether user input is required. Note: The
When called with a value of Default value is |
setMaxLength |
Sets a new value for property maxLength. Defines the highest possible number of permitted input characters that the user can enter into the text input field. Computed |
setName |
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 Default value is |
setPlaceholder |
Sets a new value for property placeholder. Text shown when no value available. When called with a value of Default value is |
setProposedControl |
Sets a new value for property proposedControl. Proposes a control to be rendered. The When called with a value of Default value is |
setSemanticObjectController |
Sets the aggregated semanticObjectController. |
setShowLabel |
Sets a new value for property showLabel. If set to When called with a value of Default value is |
setShowSuggestion |
Sets a new value for property showSuggestion. If set to When called with a value of Default value is |
setShowValueHelp |
Sets a new value for property showValueHelp. If set to When called with a value of Default value is |
setShowValueStateMessage |
Sets a new value for property showValueStateMessage. Defines whether the value state message is shown or not. When called with a value of Default value is |
setTextAlign |
Sets a new value for property textAlign. Horizontal alignment of the text. When called with a value of Default value is |
setTextDirection |
Sets a new value for property textDirection. The available text direction options are LTR and RTL. By default, the control inherits the text direction from its parent control. The Note: The When called with a value of Default value is |
setTextInEditModeSource |
Sets a new value for property textInEditModeSource. Sets the source from which text descriptions for Note: The
Note: In addition, the
Note: As of version 1.82, if When called with a value of Default value is |
setTextLabel |
Sets a new value for property textLabel. This property contains the text of an associated When called with a value of Default value is |
setTooltipLabel |
Sets a new value for property tooltipLabel. This property contains the tool tip of the associated When called with a value of Default value is |
setUnitOfMeasure |
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 |
Sets a new value for property uomEditable. Indicates whether the unit of measure field is in display or edit mode. Note: This control property is only valid if the
Note: The
When called with a value of Default value is |
setUomEnabled |
Sets a new value for property uomEnabled. Enabled state of the unit, if the When called with a value of Default value is |
setUomVisible |
Sets a new value for property uomVisible. Indicates whether the unit of measure field is visible. Note: This control property is only valid if the
Note: The When called with a value of Default value is |
setUrl |
Setter for property |
setValue |
Sets a new value for property value. The binding path expression used to determine the bound Entity Data Model (EDM) property. Note: Composite binding expressions for this property are not supported. Note: Custom formatters for this property are not supported. The When called with a value of |
setValueState |
Setter for property |
setValueStateText |
Setter for property |
setWidth |
Sets a new value for property width. Defines the width of the control. When called with a value of Default value is |
setWrapping |
Sets a new value for property wrapping. Indicates whether the control break lines (in display mode) to prevent overflow. When called with a value of Default value is |
Adds some ariaDescribedBy into the association ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to add; if empty, nothing is inserted |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
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 been changed and the focus leaves the field, or after the Enter key has been pressed.
Note: This event is fired even if the value of the text input field is subject to data type constraints and the constraints are violated. Also, the invalid value is not stored in the binding/model.
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 |
Attaches event handler fnFunction
to the changeModelValue 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.
Fired after the text in the field has been changed by user interaction in combination with one of the following actions:
ValueHelpDialog
If the value of the text input field is subject to data type constraints, the constraints must be fulfilled, which implies the value is stored in the binding/model before the event is fired.
Note: The changeModelValue event is currently experimental and might be redefined.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
Checks whether a client error has been detected in edit mode. Additionally the error message is shown, if this is not the case already.
This method is typically used to check whether the value of every inner text input field in edit mode is subject to data type constraints and whether the constraints are fulfilled.
A data type constraint for a bound Entity Data Model (EDM) property can be violated in many ways, for example:
Nullable
constraint for an EDM property typed as Edm.String
is violated.Edm.DateTime
.If this happens, the following applies:
sap.ui.core.message.MessageManager
object instance if, for example, a view object instance is registered to it.Param | Type | DefaultValue | Description |
---|---|---|---|
oSettings | object |
Settings |
|
handleSuccess | boolean | false |
Indicates whether client error checks are performed for the current value regardless of the current error state of the control. If the |
Checks the validity of the values for the given control.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | sap.ui.core.Control |
The control to be checked |
|
oSettings | object |
Additional settings |
Checks whether the value of every inner text input field in edit mode is valid.
This method is typically used to check whether the value of every inner text input field in edit mode is subject to data type constraints and whether the constraints are fulfilled.
Note: In some scenarios, invoking this method may also trigger a back-end request to check whether the value is valid.
A data type constraint for a bound Entity Data Model (EDM) property can be violated in many ways, for example:
Nullable
constraint for an EDM property typed as Edm.String
is violated.Edm.DateTime
.If this happens, the following applies:
sap.ui.core.message.MessageManager
object instance if, for example, a view object instance is registered to it.The inner private text input field fires a sap.ui.base.EventProvider#event:validationSuccess if its validation passes.
Note: In display mode, this method always returns a fulfilled Promise
object.
Note: In two-way data binding scenarios, it is usually not necessary to invoke this method explicitly to validate user input, as the data type validation is done automatically when the value in the input field has changed and the focus leaves the text input field or the enter key is pressed. However, in two-way data binding scenarios, this method may be used to check whether a value is valid before submitting it to the back-end system.
Destroys the semanticObjectController in the aggregation semanticObjectController.
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.
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 |
Detaches event handler fnFunction
from the changeModelValue event of this sap.ui.comp.smartfield.SmartField
.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
Fires event change to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
value | string |
The current value inside the text field Note: This value is the formatted value, and in some cases it might differ from the value stored in the binding/model. Usually, the value that is sent to the back-end system should be the value stored in the binding/model, which is the parsed and validated value. |
|
newValue | string |
The new value inside the text field |
Fires event changeModelValue to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
valueChanged | boolean |
Indicates whether the field quantity field has changed |
|
valueLastValueState | boolean |
Last value of the |
|
unitChanged | boolean |
Indicates whether the field unit field has changed |
|
unitLastValueState | sap.ui.core.ValueState |
Last value of the |
Fires event contextEditableChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
editable | boolean |
The value of the context editable property of the control |
Fires event editableChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
editable | boolean |
If |
Fires event entitySetFound to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
entitySet | string |
The path to the found entity set |
Fires event initialise to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event innerControlsCreated to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event press to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event valueListChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
changes | sap.ui.core.Control[] |
An array of selected values |
Fires event visibleChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
visible | boolean |
If |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property clientSideMandatoryCheck.
Determines if the mandatory check happens on the client side true
or on the server side false
.
Note: If the sap.ui.comp.smartfield.SmartField#value property of the SmartField
control is bound to an Entity Data Model (EDM) property annotated as Nullable="false"
, the mandatory validation is performed on the client side regardless of the clientSideMandatoryCheck
setting.
Example:
<Property Name="CategoryID" Type="Edm.String" Nullable="false"/>
Default value is true
.
Gets content of aggregation configuration.
Optional configuration for SmartField
.
Note: By default, the value of the displayBehaviour
property is not evaluated in edit mode. To enable this feature in edit mode, set the textInEditModeSource
control property to a non-default value.
Gets current value of property contextEditable.
Notifies the control whether controls using the SmartField
control are editable.
Default value is true
.
Gets current value of property controlContext.
Defines the context in which the layout of the SmartField
control has to be interpreted.
Default value is None
.
Gets content of aggregation controlProposal.
Proposes a control to be rendered. The SmartField
control can ignore the proposal.
Returns the EDM data type of the OData property to which the value property of the control is bound. If no model or no OData property is available null
is returned.
Gets current value of property editable.
Indicates whether the control is in display or edit mode.
Note: The SmartField
control is metadata-driven, and this control property can be ignored if the following applies:
sap:updatable
annotation.sap:creatable
annotation.sap:updatable-path
annotation.Org.OData.Capabilities.V1.InsertRestrictions
annotation.com.sap.vocabularies.Common.v1.FieldControl
annotation.Org.OData.Capabilities.V1.UpdateRestrictions
annotation.Default value is true
.
Gets current value of property enabled.
Indicates whether the user can interact with the control or not. Note: Disabled controls cannot be focused and they are out of the tab order.
Default value is true
.
Gets current value of property entitySet.
The name of an entity set for which the control manages values. This is an optional property.
If this property is left empty, the entity set is computed by parsing the binding context path, for example, Tasks('id-1428419016778-51')
is parsed to Tasks
.
Default value is empty string
.
Gets current value of property fetchValueListReadOnly.
Indicates whether the value list collection is fetched in display mode from the resource path specified in the com.sap.vocabularies.Common.v1.ValueList
annotation.
This collection data is used to infer a descriptive text for the value of the SmartField
control. However, fetching the value list collection for every SmartField
instance individually may not be ideal in some performance-critical scenarios. To optimize this default behavior, you can set this property to false
and provide the com.sap.vocabularies.Common.v1.Text
annotation, which is used to specify the URL path name to the Entity Data Model (EDM) property from which the descriptive text for the value of the SmartField
control is fetched, for example, LT (Laptop).
Note: Setting this property to false
only has an effect if the value
property of the SmartField
control is bound to an Entity Data Model (EDM) property typed as Edm.String
. In addition, applications or frameworks have to make sure the descriptive text is fetched, for example, by expanding a navigation property.
Default value is true
.
Gets current value of property fixedValueListValidationEnabled.
If the property is set to true
, a standard validation for sap.m.ComboBox is performed. An inner control sap.m.ComboBox is created and the binding is to selectedKey
. Changes at runtime are not reflected.
Note: If the property is set to false
, the inner control is sap.ui.comp.smartfield.ComboBox and the binding is to enteredValue
. In this case, any entered value is valid irrespective of whether it's in the predefined list or not.
Note: This property is applicable only for fixed-value scenarios.
Default value is false
.
Returns the name of the value-holding property of a control used in a SemanticFormElement
.
Gets current value of property historyEnabled.
If the property is set to false
, history values are disabled. Changes at runtime are not reflected. The historyEnabled
property is not applied to custom controls.
Note: For sap.m.ComboBox and sap.m.MultiComboBox the history values are disabled by default. To enable them for these controls, you need to set the historyEnabled
property to true
.
Default value is true
.
Gets current value of property importance.
Specifies the importance of the field. Applicable only when the SmartField
is used inside SmartForm
.
Default value is Low
.
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 taken into consideration.
Gets current value of property mandatory.
Indicates whether user input is required.
Note: The SmartField
control is metadata-driven and this property can be ignored if the following applies:
Nullable
annotation. The Nullable
annotation is a capability of the OData service that specifies whether a value is mandatory, hence it overrules the control's API settings. Therefore, if the Nullable
attribute is specified as Nullable="false"
, a value is mandatory.com.sap.vocabularies.Common.v1.FieldControl
annotation.Default value is false
.
Gets current value of property maxLength.
Defines the highest possible number of permitted input characters that the user can enter into the text input field.
maxLength
If the specified maxLength
value is greater than the maxLength
value specified for the underlying bound Entity Data Model (EDM) property in the service metadata document, the maxLength
value of the EDM property takes precedence. Likewise, if the application code provides a binding data type for the value
property of the SmartField
control and the binding data type has maxLength
constraints defined, this maxLength
is also taken into consideration to compute the final maxLength
value.
By design, the SmartField
control does not restrict/validate the highest number of permitted input characters for every keystroke, but only when the text input field has changed, and the browser focus leaves the text input field or the ENTER key is pressed. The SmartField
control is used more generically in broader contexts, and adding a maxLength
attribute to the HTML text input control may break data type formatting in two-way data-binding scenarios. Let's say the maxLength
property is set to 3, but the text input control has a formatter function attached to it to format the entered value "DE" to "Germany (DE)". In this case, the formatted value will be truncated by the maxLength
setting.
Default value is 0
.
Returns a metadata object for class sap.ui.comp.smartfield.SmartField.
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').
Default value is empty string
.
Gets current value of property placeholder.
Text shown when no value available.
Default value is empty string
.
Gets current value of property proposedControl.
Proposes a control to be rendered. The SmartField
control can ignore the proposal.
Default value is None
.
Gets the value of the mandatory
property.
This function is needed as the "mandatory" feature is named "required" in a lot of other controls (like Label
or Form
).
Gets content of aggregation semanticObjectController.
The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation.
Gets current value of property showLabel.
If set to false
the label is not displayed.
Default value is true
.
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
.
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
.
Gets current value of property showValueStateMessage.
Defines whether the value state message is shown or not.
Default value is true
.
Calculates the paths to the annotations used by the SmartField
control.
Param | Type | DefaultValue | Description |
---|---|---|---|
oMetaModel | sap.ui.model.odata.ODataMetaModel |
The given OData meta model |
|
oEntitySet | object |
The given entity set |
|
sValueBinding | string |
The path identifying the OData property to which the value property of the |
|
bNavigationPathsOnly | boolean |
If set to |
Gets current value of property textAlign.
Horizontal alignment of the text.
Default value is Initial
.
Gets current value of property textDirection.
The available text direction options are LTR and RTL. By default, the control inherits the text direction from its parent control.
The textDirection
property can be used when, for example, the text direction in the application is LTR but you want a specific field to have RTL text direction.
Note: The textDirection
property is not applicable for the SmartField
control for units of measure use cases.
Default value is Inherit
.
Gets current value of property textInEditModeSource.
Sets the source from which text descriptions for IDs
are fetched in edit mode, for example, for LT (Laptop).
Note: The sap.ui.comp.smartfield.TextInEditModeSource.NavigationProperty
and sap.ui.comp.smartfield.TextInEditModeSource.ValueList
enumeration members are only supported if the following applies:
value
property of the SmartField
control instance is bound to an Entity Data Model (EDM) property typed as Edm.String
or Edm.Guid
.com.sap.vocabularies.UI.v1.TextArrangement
annotation for the bound EDM property or entity type is specified in the service metadata document or annotation file.value
property of the SmartField
control is the two-way binding mode.Note: In addition, the sap.ui.comp.smartfield.TextInEditModeSource.NavigationProperty
enumeration member is only supported if the following applies:
com.sap.vocabularies.Common.v1.Text
annotation for the bound EDM property is specified in the service metadata document or annotation file whose Path
attribute points to a EDM navigation property of a lookup entity set/type whose single key property is the ID
, which contains (among other properties) the descriptive value.$expand
query parameter.1
in the service metadata document. There must be a single-valued navigation from the editable entity set/type to the lookup entity set/type.Note: As of version 1.82, if SmartField
is used inside a SmartForm
, defaultTextInEditModeSource
can be added as custom data to the form and it will be propagated to all smart fields that cover the above criteria. However, if textInEditModeSource
is added to the SmartField
as property, it will override the defaultTextInEditModeSource
propagated from the SmartForm
custom data.
Default value is None
.
Gets current value of property textLabel.
This property contains the text of an associated SmartLabel
.
Default value is empty string
.
Gets current value of property tooltipLabel.
This property contains the tool tip of the associated SmartLabel
control.
Default value is empty string
.
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.
Gets current value of property uomEditable.
Indicates whether the unit of measure field is in display or edit mode.
Note: This control property is only valid if the SmartField
control addresses a unit of measure composite field, for example, an amount field and its associated currency field. The field must then be annotated with one of the following annotations:
sap:unit
annotation.Org.OData.Measures.V1.ISOCurrency
annotation.Org.OData.Measures.V1.Unit
annotation.Note: The SmartField
control is metadata-driven, and this control property can be ignored if the following applies:
sap:updatable
annotation.sap:creatable
annotation.sap:updatable-path
annotation.Org.OData.Capabilities.V1.InsertRestrictions
annotation.com.sap.vocabularies.Common.v1.FieldControl
annotation.Org.OData.Capabilities.V1.UpdateRestrictions
annotation.Default value is true
.
Gets current value of property uomEditState.
This property is for internal use only.
Default value is -1
.
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
.
Gets current value of property uomVisible.
Indicates whether the unit of measure field is visible.
Note: This control property is only valid if the SmartField
control addresses a unit of measure composite field, for example, an amount field and its associated currency field. The field must then be annotated with one of the following annotations:
sap:unit
annotation.Org.OData.Measures.V1.ISOCurrency
annotation.Org.OData.Measures.V1.Unit
annotation.Note: The SmartField
control is metadata-driven, and this property can be ignored if the bound EDM property is annotated with the com.sap.vocabularies.Common.v1.FieldControl
annotation.
Default value is true
.
Gets current value of property url.
Contains a URL which is used to render a link. The link is rendered, if the OData property, to which the value property of the control is bound, is of type Edm.String
and the SmartField
is in display mode.
Default value is empty string
.
Gets current value of property value.
The binding path expression used to determine the bound Entity Data Model (EDM) property.
Note: Composite binding expressions for this property are not supported. Note: Custom formatters for this property are not supported. The SmartField
control usually creates its own data type based on the service metadata for the formatting of values. Also, when a custom formatter is specified for a property, the binding mode is automatically switched to one-way binding mode. Note: Named models are not supported, only the default model (named undefined) is supported. For example, when the binding path expression contains a >
sign, the string preceding it is a named model and the remainder after the >
is the binding path.
Gets current value of property valueState.
Visualizes the validation state of the control, e.g. Error
, Warning
, Success
, Information
.
Note: This method is public because of an implementation side effect and should not be used for validation purposes as it may conflict with the SmartField
control's own binding type validation logic based on the underlying metadata of the bound Entity Data Model (EDM) property. Invoking the .setValueState()
and/or .setValueStateText()
methods in a change
event handle to set an error state does not prevent an invalid value from being stored in the binding/model in two-way data binding scenarios. In addition, it does not fire the validationError
event, which is usually required by some upstream modules, for example, the message manager.
Custom validation logic must be implemented in a custom binding type rather than in a change
event handler.
Default value is None
.
Gets current value of property valueStateText.
Defines the text of the value state message popup.
Note: This method is public because of an implementation side effect and should not be used for validation purposes as it may conflict with the SmartField
control's own binding type validation logic based on the underlying metadata of the bound Entity Data Model (EDM) property. Invoking the .setValueState()
and/or .setValueStateText()
methods in a change
event handle to set an error state does not prevent an invalid value from being stored in the binding/model in two-way data binding scenarios. In addition, it does not fire the validationError
event, which is usually required by some upstream modules, for example, the message manager.
Custom validation logic must be implemented in a custom binding type rather than in a change
event handler.
Default value is empty string
.
Gets current value of property width.
Defines the width of the control.
Default value is empty string
.
Gets current value of property wrapping.
Indicates whether the control break lines (in display mode) to prevent overflow.
Default value is true
.
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to be removed or its index or ID |
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Sets a new value for property clientSideMandatoryCheck.
Determines if the mandatory check happens on the client side true
or on the server side false
.
Note: If the sap.ui.comp.smartfield.SmartField#value property of the SmartField
control is bound to an Entity Data Model (EDM) property annotated as Nullable="false"
, the mandatory validation is performed on the client side regardless of the clientSideMandatoryCheck
setting.
Example:
<Property Name="CategoryID" Type="Edm.String" Nullable="false"/>
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 |
---|---|---|---|
bClientSideMandatoryCheck | boolean | true |
New value for property |
Sets the aggregated configuration.
Param | Type | DefaultValue | Description |
---|---|---|---|
oConfiguration | sap.ui.comp.smartfield.Configuration |
The configuration to set |
Sets a new value for property contextEditable.
Notifies the control whether controls using the SmartField
control are editable.
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 |
---|---|---|---|
bContextEditable | boolean | true |
New value for property |
Sets a new value for property controlContext.
Defines the context in which the layout of the SmartField
control 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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sControlContext | sap.ui.comp.smartfield.ControlContextType | None |
New value for property |
Sets the aggregated controlProposal.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControlProposal | sap.ui.comp.smartfield.ControlProposal |
The controlProposal to set |
Sets a new value for property editable.
Indicates whether the control is in display or edit mode.
Note: The SmartField
control is metadata-driven, and this control property can be ignored if the following applies:
sap:updatable
annotation.sap:creatable
annotation.sap:updatable-path
annotation.Org.OData.Capabilities.V1.InsertRestrictions
annotation.com.sap.vocabularies.Common.v1.FieldControl
annotation.Org.OData.Capabilities.V1.UpdateRestrictions
annotation.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 |
---|---|---|---|
bEditable | boolean | true |
New value for property |
Sets a new value for property enabled.
Indicates whether the user can interact with the control or not. Note: Disabled controls cannot be focused and they are out of the tab order.
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 |
---|---|---|---|
bEnabled | boolean | true |
New value for property |
Sets a new value for property entitySet.
The name of an entity set for which the control manages values. This is an optional property.
If this property is left empty, the entity set is computed by parsing the binding context path, for example, Tasks('id-1428419016778-51')
is parsed to Tasks
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sEntitySet | string | "" |
New value for property |
Sets a new value for property fetchValueListReadOnly.
Indicates whether the value list collection is fetched in display mode from the resource path specified in the com.sap.vocabularies.Common.v1.ValueList
annotation.
This collection data is used to infer a descriptive text for the value of the SmartField
control. However, fetching the value list collection for every SmartField
instance individually may not be ideal in some performance-critical scenarios. To optimize this default behavior, you can set this property to false
and provide the com.sap.vocabularies.Common.v1.Text
annotation, which is used to specify the URL path name to the Entity Data Model (EDM) property from which the descriptive text for the value of the SmartField
control is fetched, for example, LT (Laptop).
Note: Setting this property to false
only has an effect if the value
property of the SmartField
control is bound to an Entity Data Model (EDM) property typed as Edm.String
. In addition, applications or frameworks have to make sure the descriptive text is fetched, for example, by expanding a navigation property.
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 |
---|---|---|---|
bFetchValueListReadOnly | boolean | true |
New value for property |
Sets a new value for property fixedValueListValidationEnabled.
If the property is set to true
, a standard validation for sap.m.ComboBox is performed. An inner control sap.m.ComboBox is created and the binding is to selectedKey
. Changes at runtime are not reflected.
Note: If the property is set to false
, the inner control is sap.ui.comp.smartfield.ComboBox and the binding is to enteredValue
. In this case, any entered value is valid irrespective of whether it's in the predefined list or not.
Note: This property is applicable only for fixed-value scenarios.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bFixedValueListValidationEnabled | boolean | false |
New value for property |
Sets a new value for property historyEnabled.
If the property is set to false
, history values are disabled. Changes at runtime are not reflected. The historyEnabled
property is not applied to custom controls.
Note: For sap.m.ComboBox and sap.m.MultiComboBox the history values are disabled by default. To enable them for these controls, you need to set the historyEnabled
property to true
.
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 |
---|---|---|---|
bHistoryEnabled | boolean | true |
New value for property |
Sets a new value for property importance.
Specifies the importance of the field. Applicable only when the SmartField
is used inside SmartForm
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Low
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sImportance | sap.ui.comp.smartfield.Importance | Low |
New value for property |
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 taken into consideration.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sJsontype | sap.ui.comp.smartfield.JSONType |
New value for property |
Sets a new value for property mandatory.
Indicates whether user input is required.
Note: The SmartField
control is metadata-driven and this property can be ignored if the following applies:
Nullable
annotation. The Nullable
annotation is a capability of the OData service that specifies whether a value is mandatory, hence it overrules the control's API settings. Therefore, if the Nullable
attribute is specified as Nullable="false"
, a value is mandatory.com.sap.vocabularies.Common.v1.FieldControl
annotation.When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bMandatory | boolean | false |
New value for property |
Sets a new value for property maxLength.
Defines the highest possible number of permitted input characters that the user can enter into the text input field.
maxLength
If the specified maxLength
value is greater than the maxLength
value specified for the underlying bound Entity Data Model (EDM) property in the service metadata document, the maxLength
value of the EDM property takes precedence. Likewise, if the application code provides a binding data type for the value
property of the SmartField
control and the binding data type has maxLength
constraints defined, this maxLength
is also taken into consideration to compute the final maxLength
value.
By design, the SmartField
control does not restrict/validate the highest number of permitted input characters for every keystroke, but only when the text input field has changed, and the browser focus leaves the text input field or the ENTER key is pressed. The SmartField
control is used more generically in broader contexts, and adding a maxLength
attribute to the HTML text input control may break data type formatting in two-way data-binding scenarios. Let's say the maxLength
property is set to 3, but the text input control has a formatter function attached to it to format the entered value "DE" to "Germany (DE)". In this case, the formatted value will be truncated by the maxLength
setting.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaxLength | int | 0 |
New value for property |
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.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string | "" |
New value for property |
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.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPlaceholder | string | "" |
New value for property |
Sets a new value for property proposedControl.
Proposes a control to be rendered. The SmartField
control can 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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sProposedControl | sap.ui.comp.smartfield.ControlProposalType | None |
New value for property |
Sets the aggregated semanticObjectController.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSemanticObjectController | sap.ui.comp.navpopover.SemanticObjectController |
The semanticObjectController to set |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowLabel | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowSuggestion | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowValueHelp | boolean | true |
New value for property |
Sets a new value for property showValueStateMessage.
Defines whether the value state message is shown or not.
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 |
---|---|---|---|
bShowValueStateMessage | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextAlign | sap.ui.core.TextAlign | Initial |
New value for property |
Sets a new value for property textDirection.
The available text direction options are LTR and RTL. By default, the control inherits the text direction from its parent control.
The textDirection
property can be used when, for example, the text direction in the application is LTR but you want a specific field to have RTL text direction.
Note: The textDirection
property is not applicable for the SmartField
control for units of measure use cases.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Inherit
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextDirection | sap.ui.core.TextDirection | Inherit |
New value for property |
Sets a new value for property textInEditModeSource.
Sets the source from which text descriptions for IDs
are fetched in edit mode, for example, for LT (Laptop).
Note: The sap.ui.comp.smartfield.TextInEditModeSource.NavigationProperty
and sap.ui.comp.smartfield.TextInEditModeSource.ValueList
enumeration members are only supported if the following applies:
value
property of the SmartField
control instance is bound to an Entity Data Model (EDM) property typed as Edm.String
or Edm.Guid
.com.sap.vocabularies.UI.v1.TextArrangement
annotation for the bound EDM property or entity type is specified in the service metadata document or annotation file.value
property of the SmartField
control is the two-way binding mode.Note: In addition, the sap.ui.comp.smartfield.TextInEditModeSource.NavigationProperty
enumeration member is only supported if the following applies:
com.sap.vocabularies.Common.v1.Text
annotation for the bound EDM property is specified in the service metadata document or annotation file whose Path
attribute points to a EDM navigation property of a lookup entity set/type whose single key property is the ID
, which contains (among other properties) the descriptive value.$expand
query parameter.1
in the service metadata document. There must be a single-valued navigation from the editable entity set/type to the lookup entity set/type.Note: As of version 1.82, if SmartField
is used inside a SmartForm
, defaultTextInEditModeSource
can be added as custom data to the form and it will be propagated to all smart fields that cover the above criteria. However, if textInEditModeSource
is added to the SmartField
as property, it will override the defaultTextInEditModeSource
propagated from the SmartForm
custom data.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextInEditModeSource | sap.ui.comp.smartfield.TextInEditModeSource | None |
New value for property |
Sets a new value for property textLabel.
This property contains the text of an associated SmartLabel
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTextLabel | string | "" |
New value for property |
Sets a new value for property tooltipLabel.
This property contains the tool tip of the associated SmartLabel
control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTooltipLabel | string | "" |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUnit | string |
The new unit of measure to be set. |
Sets a new value for property uomEditable.
Indicates whether the unit of measure field is in display or edit mode.
Note: This control property is only valid if the SmartField
control addresses a unit of measure composite field, for example, an amount field and its associated currency field. The field must then be annotated with one of the following annotations:
sap:unit
annotation.Org.OData.Measures.V1.ISOCurrency
annotation.Org.OData.Measures.V1.Unit
annotation.Note: The SmartField
control is metadata-driven, and this control property can be ignored if the following applies:
sap:updatable
annotation.sap:creatable
annotation.sap:updatable-path
annotation.Org.OData.Capabilities.V1.InsertRestrictions
annotation.com.sap.vocabularies.Common.v1.FieldControl
annotation.Org.OData.Capabilities.V1.UpdateRestrictions
annotation.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 |
---|---|---|---|
bUomEditable | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUomEnabled | boolean | true |
New value for property |
Sets a new value for property uomVisible.
Indicates whether the unit of measure field is visible.
Note: This control property is only valid if the SmartField
control addresses a unit of measure composite field, for example, an amount field and its associated currency field. The field must then be annotated with one of the following annotations:
sap:unit
annotation.Org.OData.Measures.V1.ISOCurrency
annotation.Org.OData.Measures.V1.Unit
annotation.Note: The SmartField
control is metadata-driven, and this property can be ignored if the bound EDM property is annotated with the com.sap.vocabularies.Common.v1.FieldControl
annotation.
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 |
---|---|---|---|
bUomVisible | boolean | true |
New value for property |
Setter for property url
. Default value is null
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
The new value for property |
Sets a new value for property value.
The binding path expression used to determine the bound Entity Data Model (EDM) property.
Note: Composite binding expressions for this property are not supported. Note: Custom formatters for this property are not supported. The SmartField
control usually creates its own data type based on the service metadata for the formatting of values. Also, when a custom formatter is specified for a property, the binding mode is automatically switched to one-way binding mode. Note: Named models are not supported, only the default model (named undefined) is supported. For example, when the binding path expression contains a >
sign, the string preceding it is a named model and the remainder after the >
is the binding path.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oValue | any |
New value for property |
Setter for property valueState
. Default value is None
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValueState | sap.ui.core.ValueState |
The new value for property |
Setter for property valueStateText
. Default value is empty/undefined
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sText | string |
The new value for property |
Sets a new value for property width.
Defines the width of the control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize | "" |
New value for property |
Sets a new value for property wrapping.
Indicates whether the control break lines (in display mode) to prevent overflow.
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 |
---|---|---|---|
bWrapping | boolean | true |
New value for property |