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

This method is used to set the properties of the input box in the Large Animating Textbox component.

Parameter Value

Syntax

this.view.<componentID>.setData(data);

Input parameter

data: JSON object containing the following key-value pairs to set the component preferences.

  • isMasked: Boolean value to enable masking user-entered characters in the input box.
  • currencySymbol: Sets the currency symbol to be displayed before an amount.
  • amountPlaceholder: Sets the placeholder text when an amount is displayed.
  • keyBoardStyle: Sets the keyboard style when entering text into the input box.
  • isCurrency: This key accepts a Boolean value.
    • When the value of this parameter is true, the component sets currencySymbol and amountPlaceholder values, and the text in the placeholder key is not animated.
    • When the value of this parameter is false, the component behaves as an Animating Textbox with large font size.
  • placeholder: Sets the filler text in the input box in a String format. This text animates to the top and becomes the title while entering the input.
  • maxTextLength: Sets the maximum number of characters allowed in the input box.
  • restrictCharactersSet: Sets the collection of characters that the user cannot enter in the input box in a String format. If the user enters any of these characters, the character is removed automatically from the input box.
  • text: The user-entered text in a String format.
  • textInputMode: Specifies the input characters type of the input box.
  • keyboardActionLabel: Sets the text of the action label of the keyboard.
  • errorText: Sets the text of the Error label of the component in a String format.
  • onBeginEditingCallback: Sets the callback function to be invoked when the onBeginEditing event of the textbox of the component is triggered.
  • onEndEditingCallback: Sets the callback function to be invoked when the onEndEditing event of the textbox of the component is triggered.
  • onDoneCallback: Sets the callback function to be invoked when the onDone event of the textbox of the component is triggered.
  • onTextChangeCallback: Sets the callback function to be invoked when the onTextChange event of the textbox of the component is triggered.
  • onClearCallback: Sets the callback function to be invoked when the onClear event of the textbox of the component is triggered.
  • isReadOnly: This parameter sets the read-only mode of the component. If the value of this parameter is true, the read-only mode of the component is enabled. If the value of this parameter is false, the read-write mode is enabled.

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

this.view.<componentID>.setReadOnly();

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

this.view.<componentID>.setReadWrite();

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

this.view.<componentID>.clearText();

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

this.view.<componentID>.setText(text);

Input parameter

text: Sets the text of the input box in a String format.

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

this.view.<componentID>.setErrorText(text);

Input parameter

text: Sets the error text in a String format.

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

this.view.<componentID>.hideError();

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

this.view.<componentID>.getData();

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.

  • text: The user-entered text in a String format.
  • isMasked: Boolean value to enable masking user-entered characters in the input box.
  • placeholder: Sets the filler text in the input box in a String format. This text animates to the top and becomes the title while entering the input.
  • textInputMode: Specifies the input characters type of the input box.

getText Method

This method is used to retrieve the user entered text in the TextBox widget of the component.

Parameter Value

Syntax

this.view.<componentID>.getText();

Input parameter

NA

Sample Code

var text = "This is a sample text";
text=this.view.largeanimatingtextbox.getText();

Return Type

text: The user-entered text in a String format.

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

text: The user-entered text in a String format.

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

text: The user-entered text in a String format.

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

text: The user-entered text in a String format.

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

text: The user-entered text in a String format.

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

 

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 2, 2022 5:08:55 PM IST

Feedback
x