sap.m.MaskInput.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.MaskInput 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.
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.MaskInput.
Returns:
_feedReplaceChar(sChar, iPlacePosition, sCurrentInputValue): String
Gets a replacement string for the character being placed in the input. Subclasses may override this method in order to get some additional behavior. For instance, switching current input character with other for time input purposes. As an example, if the user enters "2" (in 12-hour format), the consumer may use this method to replace the input from "2" to "02".
Parameters:
{String} | sChar | The current character from the input |
{int} | iPlacePosition | The position the character should occupy |
{string} | sCurrentInputValue | The value currently inside the input field (may differ from the property value) |
Returns:
{String} | A string that replaces the character |
_isCharAllowed(sChar, iIndex)
Verifies whether a character at a given position is allowed according to its mask rule.
Parameters:
{String} | sChar | The character |
{int} | iIndex | The position of the character |
Adds some rule to the aggregation rules
.
Parameters:
Returns:
Destroys all the rules in the aggregation rules
.
Returns:
getMask(): string
Gets current value of property
mask
.
Mask defined by its characters type (respectively, by its length). You should consider the following important facts: 1. The mask characters normally correspond to an existing rule (one rule per unique char). Characters which don't, are considered immutable characters (for example, the mask '2099', where '9' corresponds to a rule for digits, has the characters '2' and '0' as immutable). 2. Adding a rule corresponding to the placeholderSymbol
is not recommended and would lead to an unpredictable behavior. 3. You can use the special escape character '^' called "Caret" prepending a rule character to make it immutable. Use the double escape '^^' if you want to make use of the escape character as a immutable one.
Returns:
{string} | Value of property mask |
getPlaceholderSymbol(): string
Gets current value of property
placeholderSymbol
.
Defines a placeholder symbol. Shown at the position where there is no user input yet.
Default value is _
.
Returns:
{string} | Value of property placeholderSymbol |
Gets content of aggregation
rules
.
A list of validation rules (one rule per mask character).
Returns:
indexOfRule(oRule): int
Checks for the provided sap.m.MaskInputRule
in the aggregation rules
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a rule into the aggregation rules
.
Parameters:
{sap.m.MaskInputRule} | oRule | the rule to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the rule should be inserted at; for a negative value of iIndex , the rule is inserted at position 0; for a value greater than the current size of the aggregation, the rule is inserted at the last position |
Returns:
Removes all the controls from the aggregation
rules
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a rule from the aggregation rules
.
Parameters:
Returns:
Setter for property value
.
Parameters:
{string} | sValue | New value for property value . |
Returns: