The sap.m.ComboBoxTextField
.
Constructor for a new sap.m.ComboBoxTextField
.
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.m.ComboBoxTextField(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 |
---|---|---|---|
maxWidth | sap.ui.core.CSSSize | 100% | Sets the maximum width of the text field. Visibility: public |
showButton | boolean | true | Indicates whether the dropdown downward-facing arrow button is shown. |
Name | Type | Default Value | Description |
---|---|---|---|
editable | boolean | true | Defines whether the control can be modified by the user or not. Note: A user can tab to non-editable control, highlight it, and copy the text from it. |
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-chain. Visibility: public |
name | string | The name to be used in the HTML code (for example, for HTML forms that send data to the server via submission). Visibility: public |
|
placeholder | string | Defines a short hint intended to aid the user with data entry when the control has no value. Visibility: public |
|
required | boolean | false | Indicates that user input is required. This property is only needed for accessibility purposes when a single relationship between the field and a label (see aggregation |
showValueStateMessage | boolean | true | Indicates whether the value state message should be shown or not. |
textAlign | sap.ui.core.TextAlign | Initial | Defines the horizontal alignment of the text that is shown inside the input field. |
textDirection | sap.ui.core.TextDirection | Inherit | Defines the text directionality of the input field, e.g. |
value | string | Defines the value of the control. Visibility: public |
|
valueState | sap.ui.core.ValueState | None | Visualizes the validation state of the control, e.g. |
valueStateText | string | Defines the text that appears in the value state message pop-up. If this is not specified, a default text is shown from the resource bundle. |
|
width | sap.ui.core.CSSSize | Defines the width of the control. Note: If the provided width is too small, the control gets stretched to its min width, which is needed in order for the control to be usable and well aligned. Visibility: public |
Name | Cardinality | Type | Description |
---|---|---|---|
formattedValueStateText | 0..1 | sap.m.FormattedText |
Defines the formatted text that appears in the value state message pop-up. It can include links. If both |
Method | Description |
---|---|
sap.m.ComboBoxTextField.extend |
Creates a new subclass of class sap.m.ComboBoxTextField with name
|
getIcon |
Returns the arrow icon |
getMaxWidth |
Gets current value of property maxWidth. Sets the maximum width of the text field. Default value is |
sap.m.ComboBoxTextField.getMetadata |
Returns a metadata object for class sap.m.ComboBoxTextField. |
getShowButton |
Gets current value of property showButton. Indicates whether the dropdown downward-facing arrow button is shown. Default value is |
getValue |
Gets the Default value is an empty string. |
setMaxWidth |
Sets a new value for property maxWidth. Sets the maximum width of the text field. When called with a value of Default value is |
setShowButton |
Sets a new value for property showButton. Indicates whether the dropdown downward-facing arrow button is shown. When called with a value of Default value is |
toggleIconPressedStyle |
Toggles the icon pressed style on or off. |
Creates a new subclass of class sap.m.ComboBoxTextField with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.m.InputBase.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 |
Gets current value of property maxWidth.
Sets the maximum width of the text field.
Default value is "100%"
.
Gets current value of property showButton.
Indicates whether the dropdown downward-facing arrow button is shown.
Default value is true
.
Sets a new value for property maxWidth.
Sets the maximum width of the text field.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is "100%"
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMaxWidth | sap.ui.core.CSSSize | "100%" |
New value for property |
Sets a new value for property showButton.
Indicates whether the dropdown downward-facing arrow button is shown.
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 |
---|---|---|---|
bShowButton | boolean | true |
New value for property |