Method Summary |
|
native public void | addListener(TextFieldListener listener) Add a TextField listener. |
native public void | autoSize() Automatically grows the field to accomodate the width of the text up to the maximum field width allowed. |
native protected JavaScriptObject | create(JavaScriptObject jsObj) |
protected JavaScriptObject | getConfigPrototype() |
public String | getText() Returns the value of the text field. |
public String | getXType() |
native public void | selectText() Selects text in this field. |
native public void | selectText(int start, int end) Selects text in this field. |
public void | setAllowBlank(boolean allowBlank) False to validate that the value length > 0 (defaults to true). |
public void | setBlankText(String blankText) Error text to display if the allow blank validation fails (defaults to "This field is required"). |
public void | setDisableKeyFilter(boolean disableKeyFilter) True to disable input keystroke filtering (defaults to false). |
public void | setEmptyClass(String emptyClass) The CSS class to apply to an empty field to style the emptyText (defaults to 'x-form-empty-field'). |
public void | setEmptyText(String emptyText) The default text to display in an empty field (defaults to null). |
public void | setGrow(boolean grow) True if this field should automatically grow and shrink to its content. |
public void | setGrowMax(int growMax) The maximum width to allow when grow = true (defaults to 800). |
public void | setGrowMin(int growMin) The minimum width to allow when grow = true (defaults to 30). |
native public void | setMaskRe(String maskRe) An input mask regular expression that will be used to filter keystrokes that
don't match (defaults to null). |
public void | setMaxLength(int maxLength) |
public void | setMaxLengthText(String maxLengthText) Error text to display if the maximum length validation fails. |
public void | setMinLength(int minLength) Minimum input field length required (defaults to 0). |
public void | setMinLengthText(String minLengthText) Error text to display if the minimum length validation fails. |
public void | setPassword(boolean password) Set true if field is a password field. |
public void | setRegex(String regex) A Regular Expressionto be tested against the field value during validation (defaults to null).
If available, this regex will be evaluated only after the basic validators all return true, and will be passed
the current field value. |
public void | setRegexText(String regexText) The error text to display if regex is used and the test fails during validation (defaults to ""). |
public void | setSelectOnFocus(boolean selectOnFocus) True to automatically select any existing field text when the field receives input focus (defaults to false). |
public void | setValidator(Validator validator) Set a custom Validator for the Field. |
public void | setVtype(VType vtype) A validation type name as defined in
VType (defaults to null). |
public void | setVtypeText(String vtypeText) The validation type text if the validation specified by
TextField.setVtype(VType) fails. |
native public boolean | validateValue(String value) Validates a value according to the field's validation rules and marks the field as invalid if the validation fails. |