Large Animating Textbox
Overview
The Large Animating Textbox component is a utility component that takes users' inputs. The Large Animating Textbox component is similar in functionality to the Animating Textbox component but has a higher emphasis due to the larger font size. The primary usage of this component is to get numerical inputs such as the amount in the application. It can be used for regular text entries as well.
NOTE: The Large Animating Textbox Component is used inside the Mobile Banking application.
Large Animating Textbox Contracts
The Large Animating Textbox component contains the following contracts.
- setData Method
- setReadOnly Method
- setReadWrite Method
- clearText Method
- setText Method
- setErrorText Method
- hideError Method
- getData Method
- getText Method
- onBeginEditingCallback Event
- onEndEditingCallback Event
- onDoneCallback Event
- onTextChangeCallback Event
- onClearCallback Event
setData Method
This method is used to set the properties of the input box in the Large Animating Textbox component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
|
|
Sample Input |
var data = {
"isMasked": false,
"currencySymbol": "$"
"amountPlaceholder": "0.00"
"keyBoardStyle": constants.TEXTBOX_KEY_BOARD_STYLE_DEFAULT,
"isCurrency": true "placeholder": "Amount",
"maxTextLength": 19,
"restrictCharactersSet": "~#^|$%&*!",
"text": "123.00",
"textInputMode": constants.TEXTBOX_INPUT_MODE_ANY,
"keyboardActionLabel": TEXTBOX_KEYBOARD_LABEL_DONE,
"errorText": "",
"onBeginEditingCallback": this.formFunc1,
"onEndEditingCallback": this.formFunc2,
"onDoneCallback": this.formFunc3,
"onTextChangeCallback": this.formFunc4,
"onClearCallback": this.formFunc5,
"isReadOnly": false
};
this.view.largeanimatingtextbox.setData(data);
|
|
Return Type |
None |
setReadOnly Method
This method is used to set the component in a read-only mode.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
NA |
|
Sample Code |
this.view.largeanimatingtextbox.setReadOnly(); |
|
Return Type |
None |
setReadWrite Method
This method is used to enable the read-write mode of the component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
NA |
|
Sample Code |
this.view.largeanimatingtextbox.setReadWrite(); |
|
Return Type |
None |
clearText Method
This method is used to remove the user entered text from the input box.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
NA |
|
Sample Code |
this.view.largeanimatingtextbox.clearText(); |
|
Return Type |
None |
setText Method
This method is used to set the text to the input box in the component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
|
|
Sample Code |
var text = "This is a sample text"; this.view.largeanimatingtextbox.setText(text); |
|
Return Type |
None |
setErrorText Method
This method sets the error message to be displayed in the component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
|
|
Sample Code |
var text = "This is a mandatory field"; this.view.largeanimatingtextbox.setErrorText(text); |
|
Return Type |
None |
hideError Method
This method is used to hide the error message in the component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
NA |
|
Sample Code |
this.view.largeanimatingtextbox.hideError(); |
|
Return Type |
None |
getData Method
This method is used to retrieve the data of the component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
NA |
|
Sample Code |
var data = {
text: "john.doe@temenos.com",
isMasked: false,
placeholder: "Email ID",
textInputMode: constants.TEXTBOX_INPUT_MODE_ANY,
};
data = this.view.largeanimatingtextbox.getData();
|
|
Return Type |
A JSON object with the following key-value pairs.
|
getText Method
This method is used to retrieve the user entered text in the TextBox widget of the component.
| Parameter | Value |
|---|---|
|
Syntax |
|
| Input parameter |
NA |
|
Sample Code |
var text = "This is a sample text"; text=this.view.largeanimatingtextbox.getText(); |
|
Return Type |
|
onBeginEditingCallback Event
This event is triggered when the user starts entering text into the input box. When this event is triggered, the component executes the function set in the setData method.
| Parameter | Value |
|---|---|
| Input parameter |
|
| Programmatic Name | onBeginEditingCallback
|
|
Sample Code |
this.onBeginEditingCallback(text); |
|
Return Type |
NA |
onEndEditingCallback Event
The onEndEditingCallback event is triggered when the user has finished entering the text in the input box. This event is triggered when the user clicks on any of the following options.
- Another focusable widget on the screen such as TextBox.
- Done button on the Next-Previous bar.
- Done button on the soft keypad.
When this event is triggered, the component executes the function set in the setData method.
| Parameter | Value |
|---|---|
| Input parameter |
|
| Programmatic Name | onEndEditingCallback
|
|
Sample Code |
this.onEndEditingCallback(text); |
|
Return Type |
NA |
onDoneCallback Event
This callback is triggered when the user clicks the enter key, Done key, or Go buttons in the soft keypad. When this event is triggered, the component executes the function set in the setData method.
| Parameter | Value |
|---|---|
| Input parameter |
|
| Programmatic Name | onDoneCallback
|
|
Sample Code |
this.onDoneCallback(text); |
|
Return Type |
NA |
onTextChangeCallback Event
This event is triggered when the text inside the input box is modified. When this event is triggered, the component executes the function set in the setData method.
| Parameter | Value |
|---|---|
| Input parameter |
|
| Programmatic Name | onTextChangeCallback
|
|
Sample Code |
this.onTextChangeCallback(text); |
|
Return Type |
NA |
onClearCallback Event
This callback is triggered when the user clicks the clear button of the component. When this event is triggered, the component executes the function set in the setData method.
| Parameter | Value |
|---|---|
| Input parameter |
NA |
| Programmatic Name | onClearCallback
|
|
Sample Code |
this.onClearCallback(); |
|
Return Type |
NA |
In this topic