To learn more about using JavaScript in LeanFT, see Setting up and working with the JavaScript SDK.
For JavaScript code samples, see Code Samples - JavaScript.

Field

TerminalEmulators. Field

new Field(propsopt) → {Field}

The description of a terminal emulator field that fully supports HLLAPI.
Parameters:
Name Type Attributes Description
props Object <optional>
Initializes a field test object using the supplied property bag.
Returns:
the description object that was initialized.
Type
Field

Methods

attachedText(attachedTextopt) → {string|Description}

Returns the attached text attribute for TeField.
Parameters:
Name Type Attributes Description
attachedText string <optional>
When provided, this method acts as a setter and sets the attachedText value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored attachedText value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description

id(idopt) → {number|Description}

Returns the ID value of the TeField.
Parameters:
Name Type Attributes Description
id number <optional>
When provided, this method acts as a setter and sets the id value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored id value; otherwise it returns 'this' for use with the builder pattern.
Type
number | Description

isNumeric(isNumericopt) → {bool|Description}

Indicates whether the field is numeric.
Parameters:
Name Type Attributes Description
isNumeric bool <optional>
When provided, this method acts as a setter and sets the isNumeric value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored isNumeric value; otherwise it returns 'this' for use with the builder pattern.
Type
bool | Description

isProtected(isProtectedopt) → {bool|Description}

Indicates whether the field is protected.
Parameters:
Name Type Attributes Description
isProtected bool <optional>
When provided, this method acts as a setter and sets the isProtected value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored isProtected value; otherwise it returns 'this' for use with the builder pattern.
Type
bool | Description

isVisible(isVisibleopt) → {bool|Description}

Indicates whether the field is visible.
Parameters:
Name Type Attributes Description
isVisible bool <optional>
When provided, this method acts as a setter and sets the isVisible value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored isVisible value; otherwise it returns 'this' for use with the builder pattern.
Type
bool | Description

length(lengthopt) → {number|Description}

Returns a field length in characters.
Parameters:
Name Type Attributes Description
length number <optional>
When provided, this method acts as a setter and sets the length value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored length value; otherwise it returns 'this' for use with the builder pattern.
Type
number | Description

startPosition(startPositionopt) → {Object|Description}

Returns the 'start row' and 'start column' attributes for TeField.
Parameters:
Name Type Attributes Description
startPosition Object <optional>
When provided, this method acts as a setter and sets the startPosition value.
Properties
Name Type Attributes Description
row Number <optional>
The row position of the cursor in the emulator screen.
column Number <optional>
The column position of the cursor in the emulator screen.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored startPosition value; otherwise it returns 'this' for use with the builder pattern.
Type
Object | Description

text(textopt) → {string|Description}

Returns the content of TeField.
Parameters:
Name Type Attributes Description
text string <optional>
When provided, this method acts as a setter and sets the text value.
Returns:
If no parameter is provided, the method acts as a getter and returns the current stored text value; otherwise it returns 'this' for use with the builder pattern.
Type
string | Description