Skip to content
Reference > Classes

FormTextField

Definition

FormTextField var = .... ;

Extends

Extended By

None

Description

Text Field

Method Summary

Owner Name Return Type Description
FormTextField addOptions(options) Boolean Adds to the field's options the values in the list
FormTextField clearOptions() Boolean Removes all options
FormField exportConfig() Map Exports this field's configuration to a map.
FormTextField getAutocompleteDelimiter() String Returns the autocomplete delimiter.
DashboardResource getCallback(callbackName) Callback Returns a callback by name
DashboardResource getCallbacks() Map Returns a map of all callback definitions.
DashboardResource getChildren() List Returns a list of the child dashboard resources.
Object getClassName() String Returns the string name of this object's class type.
FormField getCssClass() String Returns the CSS class.
DashboardResource getDRI() String Returns the Dashboard Resource Indicator (DRI) as a string. DRI is the unique identifier of this resources within the entire dashboard.
DashboardResource getDashboardResourceType() String Returns the Dashboard Resource Type as a string
FormField getDisabled() Boolean Returns true if field is disabled, false otherwise.
FormField getDisplayMode() String DEPRECATED, use isVisible instead. Returns display type of field. Will return "ABSOLUTE" if field is displayed using absolute positioning. Will return "HTML" if field is displayed using form HTML.
FormTextField getDisplayValueSortOption() String Returns the sort option set for the display values.
FormField getFieldValue(varName) Object Returns the value of the field with the associated varName for the form that owns this field.
DashboardResource getFormula(formulaName) Formula Returns a Formula given the formula name.
DashboardResource getFormulaNames() Set Returns a set of the names of all formulas for this object.
DashboardResource getFormulas() Map Returns a map of all available formulas for this object. The key is the formula name.
DashboardResource getLRI() String Returns the Localized Resource Indicator (LRI) as a string. LRI is the unique identifier of this resource with the parent element.
FormField getLabel() String Returns the label associated with this field.
FormField getLabelTooltip() String Returns the tooltip associated with this field's label.
FormTextField getOptions() Collection Returns a set of all options
DashboardResource getOwner() DashboardResource Returns the DashboardResource that owns this object.
FormField getPanel() FormPanel Returns the panel that contains this field.
FormField getPosition() Rectangle Returns a Rectangle object representing the field's position as (x,y,w,h).
FormTextField getValue() String Returns this field's value.
FormField getVariableName() String Returns the variable name associated with this field.
DashboardResource invokeCallback(callbackName, args) Object Executes the specified callback definition and returns the result from the callback.
FormField isAtDefaultPosition() Boolean Returns whether field is at the default position specified in field editor.
FormTextField isShowOptionsImmediately() Boolean Returns true if dropdown options are being shown immediately after the field is focused, false otherwise.
FormField isTransient() Boolean Returns whether a field is transient.
FormField isVisible() Boolean Returns true iff this field is visible, false otherwise.
FormTextField putOption(option) Boolean Adds the option to the textfield
FormTextField removeOption(option) Boolean Removes the option from the textfield
FormField resetCssClass() Boolean Resets CSS class to default (as configured in AMI editor).
FormField resetDisabled() Boolean Resets the disabled flag to default (as configured in AMI editor).
FormTextField resetOptions() Object If options have been manually set using amiscript, this resets to the default values
FormField resetPosition() Boolean Resets field position to default position specified in field editor.
FormTextField setAutocompleteDelimiter(delimiter) Boolean Sets the delimiter for autocomplete values. (i.e. setting delimiter to "
FormField setCssClass(cssStyle) Boolean Sets CSS class. Returns empty string for no css.
FormField setDisabled(disabled) Boolean Set the disabled status of the field (true for disabling, false for enabling).
FormField setDisplayMode(mode) Boolean DEPRECATED, use setVisible instead. Sets display mode of field. Setting to "ABSOLUTE" will display field using absolute positioning. Setting to "HTML" will allow field to be displayed using the form HTML. Any other input will throw an exception.
FormTextField setDisplayValueSortOption(displaySortOption) Boolean Sets the sorting option for the display values in the autocomplete menu.
FormField setFieldValue(key, value) Boolean Sets the key value pair to this portlet's attributes and returns true if successful. For key, put in the field's variable name, then set the value.
FormField setLabelTooltip(tooltip) Boolean Sets the label tooltip.
FormTextField setOptions(options) FormTextField sets the options for textfield
FormField setPosition(x, y, w, h) Boolean Sets the field position. Specify (x,y) position, width, and height in pixels. Passing null to an argument is equivalent to not setting a value for that specific argument.
FormField setPosition(rect) Boolean Sets the position, if the position is null then resets the overrides
FormTextField setShowOptionsImmediately(showOptionsImmediately) Boolean Setting it to true will cause the field to shows dropdown with options immediately after the field is focused. Setting to false will show the dropdown as characters are being typed. Returns true on successful set, false otherwise.
FormField setValue(value) Boolean Set this field's value. This is a generic set method that is available for every field in AMI. For FormRangeSlider and FormImage field, it is advisable to use their own setValue() method.
FormField setVisible(visible) Boolean Sets the visibility of this field. Returns false iff the argument is null, true otherwise.
Object toJson() String Returns a json representation of this object.

Method Definitions


addOptions(options)

Boolean FormTextField::addOptions(Collection options)

Description

Adds to the field's options the values in the list

Parameter Definition

Name Type Description
options Collection  Options to be added

clearOptions()

Boolean FormTextField::clearOptions()

Description

Removes all options


getAutocompleteDelimiter()

String FormTextField::getAutocompleteDelimiter()

Description

Returns the autocomplete delimiter.


getDisplayValueSortOption()

String FormTextField::getDisplayValueSortOption()

Description

Returns the sort option set for the display values.


getOptions()

Collection FormTextField::getOptions()

Description

Returns a set of all options


getValue()

String FormTextField::getValue()

Description

Returns this field's value.


isShowOptionsImmediately()

Boolean FormTextField::isShowOptionsImmediately()

Description

Returns true if dropdown options are being shown immediately after the field is focused, false otherwise.


putOption(option)

Boolean FormTextField::putOption(String option)

Description

Adds the option to the textfield

Parameter Definition

Name Type Description
option String  Option to be added

removeOption(option)

Boolean FormTextField::removeOption(Object option)

Description

Removes the option from the textfield

Parameter Definition

Name Type Description
option Object  Option to be removed

resetOptions()

Object FormTextField::resetOptions()

Description

If options have been manually set using amiscript, this resets to the default values


setAutocompleteDelimiter(delimiter)

Boolean FormTextField::setAutocompleteDelimiter(String delimiter)

Description

Sets the delimiter for autocomplete values. (i.e. setting delimiter to "|" will reset the autocomplete after each occurence of "|").

Parameter Definition

Name Type Description
delimiter String  Delimiter for autocomplete values. Length cannot be greater than 5 characters.

setDisplayValueSortOption(displaySortOption)

Boolean FormTextField::setDisplayValueSortOption(String displaySortOption)

Description

Sets the sorting option for the display values in the autocomplete menu.

Parameter Definition

Name Type Description
displaySortOption String  Expected Values: NONE (original ordering), ASC, DESC

setOptions(options)

FormTextField FormTextField::setOptions(Collection options)

Description

sets the options for textfield

Parameter Definition

Name Type Description
options Collection  list of options

setShowOptionsImmediately(showOptionsImmediately)

Boolean FormTextField::setShowOptionsImmediately(Boolean showOptionsImmediately)

Description

Setting it to true will cause the field to shows dropdown with options immediately after the field is focused. Setting to false will show the dropdown as characters are being typed. Returns true on successful set, false otherwise.

Parameter Definition

Name Type Description
showOptionsImmediately Boolean  true or false