A TextField with an attached icon which triggeres an event.
Constructor for a new ValueHelpField.
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.commons.ValueHelpField(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 |
---|---|---|---|
iconDisabledURL | sap.ui.core.URI | URL of the icon for the value help when disabled. If no parameter is supplied the default icon image will be shown. If an icon font icon is used, this property is ignored. Visibility: public |
|
iconHoverURL | sap.ui.core.URI | URL of the icon for the value help when hovered. If no parameter is supplied the standard icon image will be shown. If an icon font icon is used, this property is ignored. Visibility: public |
|
iconURL | sap.ui.core.URI | URL of the standard icon for the value help. If no parameter is supplied the default icon image will be shown. This can be a URI to an image or an icon font URI. Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
accessibleRole | sap.ui.core.AccessibleRole | Textbox | Accessibility role for the text field. Visibility: public |
design | sap.ui.core.Design | Standard | Font type. valid values are Standard and Monospace. Visibility: public |
editable | boolean | true | Switches edit state of the control. Read-only fields have different colors, depending on theme setting. Visibility: public |
enabled | boolean | true | Switches enabled state of the control. Disabled fields have different colors, and can not be focused. Visibility: public |
helpId | string | empty string | Unique identifier used for help service. Visibility: public |
imeMode | sap.ui.core.ImeMode | Auto | State of the Input Method Editor (IME). Visibility: public |
maxLength | int | 0 | Maximum number of characters. Value '0' means the feature is switched off. Visibility: public |
name | string | The |
|
placeholder | string | Placeholder for the text field. |
|
required | boolean | false | Depending on theme the |
textAlign | sap.ui.core.TextAlign | Begin | Sets the horizontal alignment of the text. Visibility: public |
textDirection | sap.ui.core.TextDirection | Inherit | Direction of the text. Possible values: "rtl", "ltr". Visibility: public |
value | string | empty string | Text inside the |
valueState | sap.ui.core.ValueState | None | Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success. Visibility: public |
width | sap.ui.core.CSSSize | Width of text field. When it is set (CSS-size such as % or px), this is the exact size. When left blank, the text field length defines the width. Visibility: public |
Event | Description |
---|---|
valueHelpRequest |
Event which is fired when the ValueHelp is requested. |
Method | Description |
---|---|
attachValueHelpRequest |
Attaches event handler When called, the context of the event handler (its Event which is fired when the ValueHelp is requested. |
detachValueHelpRequest |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.commons.ValueHelpField.extend |
Creates a new subclass of class sap.ui.commons.ValueHelpField with name
|
fireValueHelpRequest |
Fires event valueHelpRequest to attached listeners. |
getIconDisabledURL |
Gets current value of property iconDisabledURL. URL of the icon for the value help when disabled. If no parameter is supplied the default icon image will be shown. If an icon font icon is used, this property is ignored. |
getIconHoverURL |
Gets current value of property iconHoverURL. URL of the icon for the value help when hovered. If no parameter is supplied the standard icon image will be shown. If an icon font icon is used, this property is ignored. |
getIconURL |
Gets current value of property iconURL. URL of the standard icon for the value help. If no parameter is supplied the default icon image will be shown. This can be a URI to an image or an icon font URI. |
sap.ui.commons.ValueHelpField.getMetadata |
Returns a metadata object for class sap.ui.commons.ValueHelpField. |
onsapshow |
Handle F4 event |
setIconDisabledURL |
Sets a new value for property iconDisabledURL. URL of the icon for the value help when disabled. If no parameter is supplied the default icon image will be shown. If an icon font icon is used, this property is ignored. When called with a value of |
setIconHoverURL |
Sets a new value for property iconHoverURL. URL of the icon for the value help when hovered. If no parameter is supplied the standard icon image will be shown. If an icon font icon is used, this property is ignored. When called with a value of |
setIconURL |
Sets a new value for property iconURL. URL of the standard icon for the value help. If no parameter is supplied the default icon image will be shown. This can be a URI to an image or an icon font URI. When called with a value of |
Attaches event handler fnFunction
to the valueHelpRequest event of this sap.ui.commons.ValueHelpField
.
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.commons.ValueHelpField
itself.
Event which is fired when the ValueHelp is requested.
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 |
Detaches event handler fnFunction
from the valueHelpRequest event of this sap.ui.commons.ValueHelpField
.
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.commons.ValueHelpField 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.commons.TextField.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 valueHelpRequest to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets current value of property iconDisabledURL.
URL of the icon for the value help when disabled. If no parameter is supplied the default icon image will be shown. If an icon font icon is used, this property is ignored.
Gets current value of property iconHoverURL.
URL of the icon for the value help when hovered. If no parameter is supplied the standard icon image will be shown. If an icon font icon is used, this property is ignored.
Gets current value of property iconURL.
URL of the standard icon for the value help. If no parameter is supplied the default icon image will be shown. This can be a URI to an image or an icon font URI.
Returns a metadata object for class sap.ui.commons.ValueHelpField.
Handle F4 event
Param | Type | DefaultValue | Description |
---|---|---|---|
oEvent | jQuery.Event |
the occurring event |
Sets a new value for property iconDisabledURL.
URL of the icon for the value help when disabled. If no parameter is supplied the default icon image will be shown. If an icon font icon is used, this property is ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconDisabledURL | sap.ui.core.URI |
New value for property |
Sets a new value for property iconHoverURL.
URL of the icon for the value help when hovered. If no parameter is supplied the standard icon image will be shown. If an icon font icon is used, this property is ignored.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconHoverURL | sap.ui.core.URI |
New value for property |
Sets a new value for property iconURL.
URL of the standard icon for the value help. If no parameter is supplied the default icon image will be shown. This can be a URI to an image or an icon font URI.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconURL | sap.ui.core.URI |
New value for property |