sap.m.MultiInput.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.MultiInput 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.Input.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.m.MultiInput.
Returns:
Adds some token to the aggregation tokens
.
Parameters:
{sap.m.Token} | oToken | the token to add; if empty, nothing is inserted |
Returns:
addValidator(fValidator)
Function adds an validation callback called before any new token gets added to the tokens aggregation
Parameters:
Attaches event handler
fnFunction
to the
tokenChange
event of this
sap.m.MultiInput
.
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.m.MultiInput
itself.
Fired when the tokens aggregation changed (add / remove token)
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.m.MultiInput itself |
Returns:
Function overwrites clone function to add tokens to MultiInput
Returns:
closeMultiLine()
Close multi-line MultiInput in multi-line mode
- Since:
- 1.28
Destroys all the tokens in the aggregation tokens
.
Returns:
Detaches event handler
fnFunction
from the
tokenChange
event of this
sap.m.MultiInput
.
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
tokenChange
to attached listeners.
Expects the following event parameters:
type
of type string
Type of tokenChange event. There are four TokenChange types: "added", "removed", "removedAll", "tokensChanged". Use Tokenizer.TokenChangeType.Added for "added", Tokenizer.TokenChangeType.Removed for "removed", Tokenizer.TokenChangeType.RemovedAll for "removedAll" and Tokenizer.TokenChangeType.TokensChanged for "tokensChanged".token
of type sap.m.Token
The added token or removed token. This parameter is used when tokenChange type is "added" or "removed".tokens
of type sap.m.Token[]
The array of removed tokens. This parameter is used when tokenChange type is "removedAll".addedTokens
of type sap.m.Token[]
The array of tokens that are added. This parameter is used when tokenChange type is "tokenChanged".removedTokens
of type sap.m.Token[]
The array of tokens that are removed. This parameter is used when tokenChange type is "tokenChanged".
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getAccessibilityInfo()
See:
{sap.ui.core.Control#getAccessibilityInfo} |
getDomRefForValueStateMessage(): DOMRef
Get the reference element which the message popup should dock to
Returns:
{DOMRef} | Dom Element which the message popup should dock to |
getEnableMultiLineMode(): boolean
Gets current value of property
enableMultiLineMode
.
If set to true, the MultiInput will be displayed in multi-line display mode. In multi-line display mode, all tokens can be fully viewed and easily edited in the MultiInput. The default value is false. Note: This property does not take effect on smartphones.
Default value is false
.
- Since:
- 1.28
Returns:
{boolean} | Value of property enableMultiLineMode |
getMaxTokens(): int
Gets current value of property
maxTokens
.
The max number of tokens that is allowed in MultiInput.
- Since:
- 1.36
Returns:
{int} | Value of property maxTokens |
getPopupAnchorDomRef(): domRef
Function returns domref which acts as reference point for the opening suggestion menu
Returns:
{domRef} | the domref at which to open the suggestion menu |
Gets content of aggregation
tokens
.
The currently displayed tokens
Returns:
indexOfToken(oToken): int
Checks for the provided sap.m.Token
in the aggregation tokens
. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.Token} | oToken | The token whose index is looked for |
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a token into the aggregation tokens
.
Parameters:
{sap.m.Token} | oToken | the token to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the token should be inserted at; for a negative value of iIndex , the token is inserted at position 0; for a value greater than the current size of the aggregation, the token is inserted at the last position |
Returns:
onfocusin(oEvent)
Focus is on MultiInput
Parameters:
onsapescape(oEvent)
When press ESC, deselect all tokens and all texts
Parameters:
ontap(oEvent)
When tap on text field, deselect all tokens
Parameters:
openMultiLine()
Expand multi-line MultiInput in multi-line mode
- Since:
- 1.28
Removes all the controls from the aggregation
tokens
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
{sap.m.Token[]} | An array of the removed elements (might be empty) |
removeAllValidators()
Function removes all validation callbacks
Removes a token from the aggregation tokens
.
Parameters:
{int|string|sap.m.Token} | vToken | The tokento remove or its index or id |
Returns:
removeValidator(fValidator)
Function removes an validation callback
Parameters:
setEnableMultiLineMode()
Setter for property enableMultiLineMode
.
- Since:
- 1.28
Sets a new value for property
maxTokens
.
The max number of tokens that is allowed in MultiInput.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{int} | iMaxTokens | New value for property maxTokens |
- Since:
- 1.36
Returns:
Function sets an array of tokens, existing tokens will get overridden
Parameters:
Returns: