sap.ui.commons.DropdownBox.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.DropdownBox 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.ComboBox.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.ui.commons.DropdownBox.
Returns:
Attaches event handler
fnFunction
to the
searchHelp
event of this
sap.ui.commons.DropdownBox
.
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.DropdownBox
itself.
Event fired whenever the configured searchHelpItem is clicked or the searchHelpItem is configured and F4 key is pressed.
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.commons.DropdownBox itself |
Returns:
clearHistory()
Using this method the history of the DropdownBox can be cleared. This might be necessary if the items of the DropdownBox have changed. Otherwise invalid items may appear in the history.
Detaches event handler
fnFunction
from the
searchHelp
event of this
sap.ui.commons.DropdownBox
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
Fires event
searchHelp
to attached listeners.
Expects the following event parameters:
value
of type string
The current value of the DropdownBox.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getMaxHistoryItems(): int
Gets current value of property
maxHistoryItems
.
Maximum number of history items in the list.
If 0 no history is displayed or stored. The history is locally stored on the client. Therefore do not activate this feature when this control handles confidential data.
Default value is 0
.
Returns:
{int} | Value of property maxHistoryItems |
getSearchHelpAdditionalText(): string
Gets current value of property
searchHelpAdditionalText
.
(optional) The additional Text to use for the search help entry.
Returns:
{string} | Value of property searchHelpAdditionalText |
getSearchHelpEnabled(): boolean
Gets current value of property
searchHelpEnabled
.
Whether the DropdownBox's search help should be enabled.
Default value is false
.
Returns:
{boolean} | Value of property searchHelpEnabled |
Gets current value of property
searchHelpIcon
.
(optional) The URI of the icon to use for the search help entry.
Returns:
getSearchHelpText(): string
Gets current value of property
searchHelpText
.
(optional) The text to use for the search help entry.
Returns:
{string} | Value of property searchHelpText |
getTooltip_AsString(): string
Extends the method inherited from sap.ui.core.Element by providing information on Search Help access (if needed)
Returns:
{string} | string tooltip or undefined |
onAfterRendering(oEvent)
Ensure that handed in ListBoxes are taken from the visible UI immediately.
Parameters:
onclick(oEvent)
Handle the click event happening in the DropdownBox
Parameters:
onfocusin(oEvent)
Handle focusin event Ensures the text gets selected when focus gets into the field
Parameters:
onkeydown(oEvent)
Handle keydown event
Parameters:
onkeypress(oEvent)
Handle keypress event
Parameters:
onkeyup(oEvent)
Handle keyup event This must only be considered if it is from Backspace-key in IE or after paste. In case there is a keyup with a tab this results from being entered via tabbing and can be ignored, too.
Parameters:
onpaste(oEvent)
Handle paste event
Parameters:
onsapdelete(oEvent)
Handle pseudo event onsapdelete. If triggered with open dropdown and current item provided by history feature, removes the selected item from this instance's history.
Parameters:
onsaphome(oEvent)
Handle pseudo event onsaphome
Parameters:
onsapleft(oEvent)
Move the cursor one step to the left (and adapt selection)
Parameters:
onsapright(oEvent)
Move the cursor one step to the right (and adapt selection)
Parameters:
onsapshow(oEvent)
Handle sapshow pseudo events on the control
Parameters:
onselect(oEvent)
Handle the select event happening in the DropdownBox
Parameters:
Sets a new value for property
maxHistoryItems
.
Maximum number of history items in the list.
If 0 no history is displayed or stored. The history is locally stored on the client. Therefore do not activate this feature when this control handles confidential data.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{int} | iMaxHistoryItems | New value for property maxHistoryItems |
Returns:
Overwrite of Setter for property
searchHelpAdditionalText
.
Default value is empty/undefined
Parameters:
{string} | sSearchHelpAdditionalText | new value for property searchHelpAdditionalText |
Returns:
Overwrite of Setter for property
searchHelpEnabled
. This method accepts additional parameter to be compatiple with the previous functionality
Default value is false
Parameters:
{boolean} | bEnabled | new value for property searchHelpEnabled |
{string} | sText | new value for property searchHelpText |
{string} | sAdditionalText | new value for property searchHelpAdditionalText |
{string} | sIcon | new value for property searchHelpIcon |
Returns:
Overwrite of Setter for property
searchHelpIcon
.
Default value is empty/undefined
Parameters:
Returns:
Overwrite of Setter for property
searchHelpText
.
Default value is empty/undefined
Parameters:
{string} | sSearchHelpText | new value for property searchHelpText |
Returns: