com.smartgwt.client.widgets.form.fields
Class TextItem

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.core.RefDataClass
              extended by com.smartgwt.client.widgets.form.fields.FormItem
                  extended by com.smartgwt.client.widgets.form.fields.TextItem
All Implemented Interfaces:
HasHandlers, HasBlurHandlers, HasChangedHandlers, HasChangeHandlers, HasClickHandlers, HasDoubleClickHandlers, HasEditorEnterHandlers, HasEditorExitHandlers, HasFocusHandlers, HasIconClickHandlers, HasIconKeyPressHandlers, HasItemHoverHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasKeyUpHandlers, HasPickerIconClickHandlers, HasTitleClickHandlers, HasTitleDoubleClickHandlers, HasTitleHoverHandlers
Direct Known Subclasses:
ComboBoxItem, FloatItem, IntegerItem, PasswordItem, SpinnerItem, TimeItem, UploadItem

public class TextItem
extends FormItem

FormItem for managing a text field.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
TextItem()
           
TextItem(JavaScriptObject jsObj)
           
TextItem(String name)
           
TextItem(String name, String title)
           
 
Method Summary
 void deselectValue()
          If this item currently has focus, clear the current selection.
 void deselectValue(Boolean start)
          If this item currently has focus, clear the current selection.
 Boolean getChangeOnKeypress()
          Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.
 CharacterCasing getCharacterCasing()
          Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue.
 String getEnteredValue()
          Returns the raw text value typed into this form field, which can differ from FormItem.getValue in various cases - for example: for items that constrain the value range, such as a DateItem with enforceDate:true, or a ComboBoxItem with addUnknownValues:false for items with a defined valueMap or edit value formatter and parser functions which converts display value to data value while the item has focus if changeOnKeypress is false
 Boolean getFormatOnFocusChange()
          Should formatEditorValue re-run whenever this item recieves or loses focus? Setting this property allows developers to conditionally format the display value based on item.hasFocus, typically to display a longer, more informative string while the item does not have focus, and simplifying it down to an easier-to-edit string when the user puts focus into the item.
 int getHeight()
          Default height for text items.
 String getHint()
          Returns the hint text for this item.
 String getKeyPressFilter()
          Sets a keypress filter regular expression to limit valid characters that can be entered by the user.
 Integer getLength()
          if set, maximum number of characters for this field
 String getMask()
          Input mask used to filter text entry.
 Boolean getMaskOverwriteMode()
          During entry into masked field, should keystrokes overwrite current position value? By default new keystrokes are inserted into the field.
 String getMaskPadChar()
          Character that is used to fill required empty mask positions to display text while control has no focus.
 String getMaskPromptChar()
          Character that is used to fill required empty mask positions to display text while control has focus.
 Boolean getMaskSaveLiterals()
          Should entered mask value be saved with embedded literals?
static TextItem getOrCreateRef(JavaScriptObject jsObj)
           
 Boolean getPrintFullText()
          When generating a print-view of the component containing this TextItem, should the form item expand to accommodate its value? If set to false the text box will not expand to fit its content in the print view, instead showing exactly as it does in the live form.
 Boolean getSaveOnEnter()
          Text items will submit their containing form on enter keypress if saveOnEnter is true.
 int[] getSelectionRange()
          For text-based items, this method returns the indices of the start/end of the current selection.
 Boolean getSelectOnFocus()
          Allows the selectOnFocus behavior to be configured on a per-FormItem basis.
 Boolean getShowHintInField()
          If showing hint for this form item, should it be shown within the field?
 String getTextBoxStyle()
          Base CSS class name for this item's input element.
 String getValueAsString()
          Return the value tracked by this form item.
 int getWidth()
          Default width for fields.
 void selectValue()
          Put focus in this item and select the entire value.
 void setChangeOnKeypress(Boolean changeOnKeypress)
          Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.
 void setCharacterCasing(CharacterCasing characterCasing)
          Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue.
 void setFormatOnFocusChange(Boolean formatOnFocusChange)
          Should formatEditorValue re-run whenever this item recieves or loses focus? Setting this property allows developers to conditionally format the display value based on item.hasFocus, typically to display a longer, more informative string while the item does not have focus, and simplifying it down to an easier-to-edit string when the user puts focus into the item.
 void setHeight(int height)
          Default height for text items.
 void setJavaScriptObject(JavaScriptObject jsObj)
           
 void setKeyPressFilter(String keyPressFilter)
          Sets a keypress filter regular expression to limit valid characters that can be entered by the user.
 void setLength(Integer length)
          if set, maximum number of characters for this field
 void setMask(String mask)
          Input mask used to filter text entry.
 void setMaskOverwriteMode(Boolean maskOverwriteMode)
          During entry into masked field, should keystrokes overwrite current position value? By default new keystrokes are inserted into the field.
 void setMaskPadChar(String maskPadChar)
          Character that is used to fill required empty mask positions to display text while control has no focus.
 void setMaskPromptChar(String maskPromptChar)
          Character that is used to fill required empty mask positions to display text while control has focus.
 void setMaskSaveLiterals(Boolean maskSaveLiterals)
          Should entered mask value be saved with embedded literals?
 void setPrintFullText(Boolean printFullText)
          When generating a print-view of the component containing this TextItem, should the form item expand to accommodate its value? If set to false the text box will not expand to fit its content in the print view, instead showing exactly as it does in the live form.
 void setSaveOnEnter(Boolean saveOnEnter)
          Text items will submit their containing form on enter keypress if saveOnEnter is true.
 void setSelectionRange(int start, int end)
          Puts focus into this form item and selects characters between the given indices.
 void setSelectOnFocus(Boolean selectOnFocus)
          Allows the selectOnFocus behavior to be configured on a per-FormItem basis.
 void setShowHintInField(Boolean showHintInField)
          If showing hint for this form item, should it be shown within the field?
 void setTextBoxStyle(String textBoxStyle)
          Base CSS class name for this item's input element.
 void setWidth(int width)
          Default width for fields.
 
Methods inherited from class com.smartgwt.client.widgets.form.fields.FormItem
_getValue, addBlurHandler, addChangedHandler, addChangeHandler, addClickHandler, addDoubleClickHandler, addEditorEnterHandler, addEditorExitHandler, addFocusHandler, addIconClickHandler, addIconKeyPressHandler, addItemHoverHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addPickerIconClickHandler, addTitleClickHandler, addTitleDoubleClickHandler, addTitleHoverHandler, blurItem, canEditCriterion, clearValue, convertToFormItemArray, disable, enable, focusInItem, getAccessKey, getAlign, getAllowExpressions, getAlwaysFetchMissingValues, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsString, getBrowserSpellCheck, getCanEdit, getCanFocus, getCellHeight, getCellStyle, getClassName, getConfig, getContainerWidget, getCriteriaField, getCriterion, getCriterion, getDataPath, getDateFormatter, getDecimalPad, getDecimalPrecision, getDefaultIconSrc, getDisabled, getDisableIconsOnReadOnly, getDisplayField, getDisplayFieldName, getDisplayValue, getDisplayValue, getEditorTypeConfig, getEditPendingCSSText, getEmptyDisplayValue, getEmptyValueIcon, getEndRow, getErrorIconHeight, getErrorIconSrc, getErrorIconWidth, getErrorMessageWidth, getFetchMissingValues, getFieldName, getFilterLocally, getForm, getFullDataPath, getGlobalTabIndex, getHintStyle, getHoverAlign, getHoverDelay, getHoverHeight, getHoverOpacity, getHoverStyle, getHoverVAlign, getHoverWidth, getIcon, getIconHeight, getIconPageRect, getIconPrompt, getIconRect, getIconVAlign, getIconWidth, getImageURLPrefix, getImageURLSuffix, getImplicitSave, getImplicitSaveOnBlur, getInputFormat, getLeft, getLocateItemBy, getMultipleValueSeparator, getName, getOperator, getOptionCriteria, getOptionFilterContext, getOptionOperationId, getPageLeft, getPageRect, getPageTop, getPickerIconHeight, getPickerIconName, getPickerIconPrompt, getPickerIconSrc, getPickerIconWidth, getPrintTextBoxStyle, getPrintTitleStyle, getPrompt, getRect, getRedrawOnChange, getRejectInvalidValueOnChange, getRequired, getRequiredMessage, getRowSpan, getSelectedRecord, getShouldSaveValue, getShowDisabled, getShowErrorIcon, getShowErrorStyle, getShowErrorText, getShowFocused, getShowFocusedIcons, getShowFocusedPickerIcon, getShowHint, getShowIcons, getShowOverIcons, getShowPickerIcon, getShowTitle, getShowValueIconOnly, getStartRow, getStopOnError, getSuppressValueIcon, getSynchronousValidation, getTabIndex, getTextAlign, getTimeFormatter, getTitle, getTitleAlign, getTitleColSpan, getTitleOrientation, getTitleStyle, getTitleVAlign, getTooltip, getTop, getType, getValidateOnChange, getValidateOnExit, getValidOperators, getVAlign, getValue, getValueField, getValueFieldName, getValueIconHeight, getValueIconLeftPadding, getValueIconRightPadding, getValueIconSize, getValueIconWidth, getVisible, getVisibleHeight, getVisibleWidth, getWrapTitle, hasAdvancedCriteria, hide, hideIcon, invalidateDisplayValueCache, isCreated, isDisabled, isDrawn, isVisible, redraw, setAccessKey, setAlign, setAllowExpressions, setAlwaysFetchMissingValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setBrowserSpellCheck, setCanEdit, setCanEditCriterionPredicate, setCanFocus, setCellHeight, setCellStyle, setColSpan, setColSpan, setCriteriaField, setCriterion, setCriterionGetter, setCriterionSetter, setDataPath, setDateFormatter, setDecimalPad, setDecimalPrecision, setDefaultIconSrc, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDefaultValue, setDisabled, setDisableIconsOnReadOnly, setDisplayField, setDisplayFormat, setDisplayFormat, setEditorType, setEditorValueFormatter, setEditorValueParser, setEditPendingCSSText, setEmptyDisplayValue, setEmptyValueIcon, setEndRow, setErrorFormatter, setErrorIconHeight, setErrorIconSrc, setErrorIconWidth, setErrorMessageWidth, setErrorOrientation, setFetchMissingValues, setFilterLocally, setGlobalTabIndex, setHeight, setHint, setHintStyle, setHoverAlign, setHoverDelay, setHoverHeight, setHoverOpacity, setHoverStyle, setHoverVAlign, setHoverWidth, setIconHeight, setIconPrompt, setIcons, setIconVAlign, setIconWidth, setImageURLPrefix, setImageURLSuffix, setImplicitSave, setImplicitSaveOnBlur, setInitHandler, setInputFormat, setInputTransformer, setItemHoverFormatter, setItemTitleHoverFormatter, setLeft, setLocateItemBy, setMultipleValueSeparator, setName, setOperator, setOptionCriteria, setOptionDataSource, setOptionFilterContext, setOptionOperationId, setPickerIconHeight, setPickerIconName, setPickerIconPrompt, setPickerIconSrc, setPickerIconWidth, setPrintTextBoxStyle, setPrintTitleStyle, setPrompt, setProperty, setProperty, setProperty, setProperty, setProperty, setRedrawOnChange, setRedrawOnChange, setRejectInvalidValueOnChange, setRequired, setRequiredMessage, setRowSpan, setShouldSaveValue, setShowDisabled, setShowErrorIcon, setShowErrorStyle, setShowErrorText, setShowFocused, setShowFocusedIcons, setShowFocusedPickerIcon, setShowHint, setShowIcons, setShowIfCondition, setShowOverIcons, setShowPickerIcon, setShowTitle, setShowValueIconOnly, setStartRow, setStopOnError, setSuppressValueIcon, setSynchronousValidation, setTabIndex, setTextAlign, setTimeFormatter, setTitle, setTitleAlign, setTitleColSpan, setTitleOrientation, setTitleStyle, setTitleVAlign, setTooltip, setTop, setType, setValidateOnChange, setValidateOnExit, setValidators, setValidOperators, setVAlign, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueField, setValueFormatter, setValueIconHeight, setValueIconLeftPadding, setValueIconMapper, setValueIconRightPadding, setValueIcons, setValueIconSize, setValueIconWidth, setValueMap, setValueMap, setVisible, setWidth, setWrapTitle, shouldFetchMissingValue, shouldSaveOnEnter, show, showIcon, showPicker, stopHover, updateState, validate
 
Methods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef
 
Methods inherited from class com.smartgwt.client.core.DataClass
doAddHandler, fireEvent, getAttributeAsDoubleArray, getAttributeAsIntArray, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsStringArray, getAttributes, getHandlerCount, getJsObj, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute
 
Methods inherited from class com.smartgwt.client.core.JsObject
setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

TextItem

public TextItem()

TextItem

public TextItem(JavaScriptObject jsObj)

TextItem

public TextItem(String name)

TextItem

public TextItem(String name,
                String title)
Method Detail

getOrCreateRef

public static TextItem getOrCreateRef(JavaScriptObject jsObj)

setJavaScriptObject

public void setJavaScriptObject(JavaScriptObject jsObj)
Overrides:
setJavaScriptObject in class FormItem

setChangeOnKeypress

public void setChangeOnKeypress(Boolean changeOnKeypress)
Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.

Note: If false, the value returned by getValue will not reflect the value displayed in the form item element as long as focus is in the form item element.

Parameters:
changeOnKeypress - changeOnKeypress Default value is true

getChangeOnKeypress

public Boolean getChangeOnKeypress()
Should this form item fire its change handler (and store its value in the form) on every keypress? Set to false to suppress the 'change' handler firing (and the value stored) on every keypress.

Note: If false, the value returned by getValue will not reflect the value displayed in the form item element as long as focus is in the form item element.

Returns:
Boolean

setCharacterCasing

public void setCharacterCasing(CharacterCasing characterCasing)
Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue.

Note: character casing cannot be used at the same time as a mask.

Note : This is an advanced setting

Parameters:
characterCasing - characterCasing Default value is TextItem.DEFAULT
See Also:
KeyPress Filters Example

getCharacterCasing

public CharacterCasing getCharacterCasing()
Should entered characters be converted to upper or lowercase? Also applies to values applied with FormItem.setValue.

Note: character casing cannot be used at the same time as a mask.

Returns:
CharacterCasing
See Also:
KeyPress Filters Example

setFormatOnFocusChange

public void setFormatOnFocusChange(Boolean formatOnFocusChange)
Should formatEditorValue re-run whenever this item recieves or loses focus? Setting this property allows developers to conditionally format the display value based on item.hasFocus, typically to display a longer, more informative string while the item does not have focus, and simplifying it down to an easier-to-edit string when the user puts focus into the item.

Parameters:
formatOnFocusChange - formatOnFocusChange Default value is false

getFormatOnFocusChange

public Boolean getFormatOnFocusChange()
Should formatEditorValue re-run whenever this item recieves or loses focus? Setting this property allows developers to conditionally format the display value based on item.hasFocus, typically to display a longer, more informative string while the item does not have focus, and simplifying it down to an easier-to-edit string when the user puts focus into the item.

Returns:
Boolean

setHeight

public void setHeight(int height)
Default height for text items.

Overrides:
setHeight in class FormItem
Parameters:
height - height Default value is 19
See Also:
Appearance overview and related methods

getHeight

public int getHeight()
Default height for text items.

Overrides:
getHeight in class FormItem
Returns:
int
See Also:
Appearance overview and related methods

setKeyPressFilter

public void setKeyPressFilter(String keyPressFilter)
Sets a keypress filter regular expression to limit valid characters that can be entered by the user. If defined, keys that match the regular expression are allowed; all others are suppressed. The filter is applied after character casing, if defined.

Note: keypress filtering cannot be used at the same time as a mask.

If this method is called after the component has been drawn/initialized: Set the keyPressFilter for this item

Note : This is an advanced setting

Parameters:
keyPressFilter - new keyPress filter for the item. See String. Default value is null
See Also:
setCharacterCasing(com.smartgwt.client.types.CharacterCasing), KeyPress Filters Example

getKeyPressFilter

public String getKeyPressFilter()
Sets a keypress filter regular expression to limit valid characters that can be entered by the user. If defined, keys that match the regular expression are allowed; all others are suppressed. The filter is applied after character casing, if defined.

Note: keypress filtering cannot be used at the same time as a mask.

Returns:
. See String
See Also:
getCharacterCasing(), KeyPress Filters Example

setLength

public void setLength(Integer length)
if set, maximum number of characters for this field

Parameters:
length - length Default value is null
See Also:
Validation overview and related methods

getLength

public Integer getLength()
if set, maximum number of characters for this field

Returns:
Integer
See Also:
Validation overview and related methods

setMask

public void setMask(String mask)
Input mask used to filter text entry.

Sample masks:

Overview of available mask characters

CharacterDescription
0Digit (0 through 9) or plus [+] or minus [-] signs
9Digit or space
#Digit
LLetter (A through Z)
?Letter (A through Z) or space
ALetter or digit
aLetter or digit
CAny character or space
 
<Causes all characters that follow to be converted to lowercase
>Causes all characters that follow to be converted to uppercase

Any character not matching one of the above mask characters or that is escaped with a backslash (\) is considered to be a literal.

Custom mask characters can be defined by standard regular expression character set or range. For example, a hexadecimal color code mask could be:

Note: input mask cannot be used at the same time as a keyPressFilter. Also note that this property is not supported for ComboBoxItem or SpinnerItem.

If this method is called after the component has been drawn/initialized: Set the mask for this item.

Note that the current value of the field is cleared when changing the mask.

Note : This is an advanced setting

Parameters:
mask - mask to apply to text item. See String. Default value is null
See Also:
setKeyPressFilter(java.lang.String), Text - Masked Example

getMask

public String getMask()
Input mask used to filter text entry.

Sample masks:

Overview of available mask characters

CharacterDescription
0Digit (0 through 9) or plus [+] or minus [-] signs
9Digit or space
#Digit
LLetter (A through Z)
?Letter (A through Z) or space
ALetter or digit
aLetter or digit
CAny character or space
 
<Causes all characters that follow to be converted to lowercase
>Causes all characters that follow to be converted to uppercase

Any character not matching one of the above mask characters or that is escaped with a backslash (\) is considered to be a literal.

Custom mask characters can be defined by standard regular expression character set or range. For example, a hexadecimal color code mask could be:

Note: input mask cannot be used at the same time as a keyPressFilter. Also note that this property is not supported for ComboBoxItem or SpinnerItem.

Returns:
. See String
See Also:
getKeyPressFilter(), Text - Masked Example

setMaskOverwriteMode

public void setMaskOverwriteMode(Boolean maskOverwriteMode)
During entry into masked field, should keystrokes overwrite current position value? By default new keystrokes are inserted into the field.

Note : This is an advanced setting

Parameters:
maskOverwriteMode - maskOverwriteMode Default value is null

getMaskOverwriteMode

public Boolean getMaskOverwriteMode()
During entry into masked field, should keystrokes overwrite current position value? By default new keystrokes are inserted into the field.

Returns:
Boolean

setMaskPadChar

public void setMaskPadChar(String maskPadChar)
Character that is used to fill required empty mask positions to display text while control has no focus.

Note : This is an advanced setting

Parameters:
maskPadChar - . See String. Default value is " "

getMaskPadChar

public String getMaskPadChar()
Character that is used to fill required empty mask positions to display text while control has no focus.

Returns:
. See String

setMaskPromptChar

public void setMaskPromptChar(String maskPromptChar)
Character that is used to fill required empty mask positions to display text while control has focus.

Note : This is an advanced setting

Parameters:
maskPromptChar - . See String. Default value is "_"

getMaskPromptChar

public String getMaskPromptChar()
Character that is used to fill required empty mask positions to display text while control has focus.

Returns:
. See String

setMaskSaveLiterals

public void setMaskSaveLiterals(Boolean maskSaveLiterals)
Should entered mask value be saved with embedded literals?

Note : This is an advanced setting

Parameters:
maskSaveLiterals - maskSaveLiterals Default value is null

getMaskSaveLiterals

public Boolean getMaskSaveLiterals()
Should entered mask value be saved with embedded literals?

Returns:
Boolean

setPrintFullText

public void setPrintFullText(Boolean printFullText)
When generating a print-view of the component containing this TextItem, should the form item expand to accommodate its value? If set to false the text box will not expand to fit its content in the print view, instead showing exactly as it does in the live form.

Parameters:
printFullText - printFullText Default value is false
See Also:
Printing overview and related methods

getPrintFullText

public Boolean getPrintFullText()
When generating a print-view of the component containing this TextItem, should the form item expand to accommodate its value? If set to false the text box will not expand to fit its content in the print view, instead showing exactly as it does in the live form.

Returns:
Boolean
See Also:
Printing overview and related methods

setSaveOnEnter

public void setSaveOnEnter(Boolean saveOnEnter)
Text items will submit their containing form on enter keypress if saveOnEnter is true. Setting this property to false will disable this behavior.

Overrides:
setSaveOnEnter in class FormItem
Parameters:
saveOnEnter - saveOnEnter Default value is true

getSaveOnEnter

public Boolean getSaveOnEnter()
Text items will submit their containing form on enter keypress if saveOnEnter is true. Setting this property to false will disable this behavior.

Overrides:
getSaveOnEnter in class FormItem
Returns:
Boolean

setSelectOnFocus

public void setSelectOnFocus(Boolean selectOnFocus)
Allows the selectOnFocus behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.

Overrides:
setSelectOnFocus in class FormItem
Parameters:
selectOnFocus - selectOnFocus Default value is null
See Also:
Focus overview and related methods

getSelectOnFocus

public Boolean getSelectOnFocus()
Allows the selectOnFocus behavior to be configured on a per-FormItem basis. Normally all items in a form default to the value of selectOnFocus.

Overrides:
getSelectOnFocus in class FormItem
Returns:
Boolean
See Also:
Focus overview and related methods

setShowHintInField

public void setShowHintInField(Boolean showHintInField)
If showing hint for this form item, should it be shown within the field?

CSS style for the hint is textBoxStyle with the suffix "Hint" appended to it. If the item is disabled the suffix "DisabledHint" will be used.

Note : This is an advanced setting

Parameters:
showHintInField - showHintInField Default value is null
See Also:
FormItem.setHint(java.lang.String), Appearance overview and related methods

getShowHintInField

public Boolean getShowHintInField()
If showing hint for this form item, should it be shown within the field?

CSS style for the hint is textBoxStyle with the suffix "Hint" appended to it. If the item is disabled the suffix "DisabledHint" will be used.

Returns:
Boolean
See Also:
FormItem.getHint(), Appearance overview and related methods

setTextBoxStyle

public void setTextBoxStyle(String textBoxStyle)
Base CSS class name for this item's input element. NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Overrides:
setTextBoxStyle in class FormItem
Parameters:
textBoxStyle - . See FormItemBaseStyle. Default value is "textItem"
See Also:
Appearance overview and related methods

getTextBoxStyle

public String getTextBoxStyle()
Base CSS class name for this item's input element. NOTE: See the CompoundFormItem_skinning discussion for special skinning considerations.

Overrides:
getTextBoxStyle in class FormItem
Returns:
. See FormItemBaseStyle
See Also:
Appearance overview and related methods

setWidth

public void setWidth(int width)
Default width for fields.

Overrides:
setWidth in class FormItem
Parameters:
width - width Default value is 150
See Also:
Appearance overview and related methods

getWidth

public int getWidth()
Default width for fields.

Overrides:
getWidth in class FormItem
Returns:
int
See Also:
Appearance overview and related methods

deselectValue

public void deselectValue()
If this item currently has focus, clear the current selection. leaving focus in the item. Has no effect if the item is undrawn or unfocused. Only applies to text-based items.


deselectValue

public void deselectValue(Boolean start)
If this item currently has focus, clear the current selection. leaving focus in the item. Has no effect if the item is undrawn or unfocused. Only applies to text-based items.

Parameters:
start - By default the text insertion cursor will be moved to the end of the current value - pass in this parameter to move to the start instead

getEnteredValue

public String getEnteredValue()
Returns the raw text value typed into this form field, which can differ from FormItem.getValue in various cases - for example:

Returns:
current entered value

getHint

public String getHint()
Returns the hint text for this item. Default implementation returns hint, or null if there is no hint to show.

Overrides:
getHint in class FormItem
Returns:
HTML to show as the hint for the item
See Also:
Appearance overview and related methods

selectValue

public void selectValue()
Put focus in this item and select the entire value. Only applies to text based items


setSelectionRange

public void setSelectionRange(int start,
                              int end)
Puts focus into this form item and selects characters between the given indices. Only applies to drawn text based items.

Parameters:
start - selection starting character index
end - end of selection character index

getValueAsString

public String getValueAsString()
Return the value tracked by this form item.

Returns:
value of this element

getSelectionRange

public int[] getSelectionRange()
For text-based items, this method returns the indices of the start/end of the current selection. Returns null if the item doesn't have focus.

Returns:
2 element array showing character index of the current selection's start and end point within this item's value. May be null if the item doesn't have focus.