Package org.teamapps.ux.component.field
Class TextField
- java.lang.Object
-
- org.teamapps.ux.component.AbstractComponent
-
- org.teamapps.ux.component.field.AbstractField<java.lang.String>
-
- org.teamapps.ux.component.field.TextField
-
- All Implemented Interfaces:
ClientObject,Component,TextInputHandlingField
- Direct Known Subclasses:
MultiLineTextField,PasswordField
public class TextField extends AbstractField<java.lang.String> implements TextInputHandlingField
-
-
Field Summary
Fields Modifier and Type Field Description Event<SpecialKey>onSpecialKeyPressedEvent<java.lang.String>onTextInput-
Fields inherited from class org.teamapps.ux.component.field.AbstractField
onBlur, onFocus, onValueChanged, onVisibilityChanged
-
Fields inherited from class org.teamapps.ux.component.AbstractComponent
DELETED_ATTRIBUTE, onRendered
-
-
Constructor Summary
Constructors Constructor Description TextField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.teamapps.dto.UiFieldcreateUiComponent()java.lang.StringgetEmptyText()intgetMaxCharacters()voidhandleUiEvent(org.teamapps.dto.UiEvent event)booleanisAutofill()booleanisEmptyValue(java.lang.String value)Whether this value be regarded as empty / "no user input".booleanisShowClearButton()Event<SpecialKey>onSpecialKeyPressed()Event<java.lang.String>onTextInput()voidsetAutofill(boolean autofill)TextFieldsetEmptyText(java.lang.String emptyText)TextFieldsetMaxCharacters(int maxCharacters)TextFieldsetShowClearButton(boolean showClearButton)-
Methods inherited from class org.teamapps.ux.component.field.AbstractField
addCustomFieldMessage, addCustomFieldMessage, addValidator, applyValueFromUi, clearCustomFieldMessages, clearValidatorMessages, convertUiValueToUxValue, convertUxValueToUiValue, focus, getCustomFieldMessages, getDefaultMessagePosition, getDefaultMessageVisibility, getEditingMode, getFieldMessages, getMaxFieldMessageSeverity, getValidators, getValue, isEmpty, isRequired, isValid, isValueChangedByClient, mapAbstractFieldAttributesToUiField, removeCustomFieldMessage, removeValidator, setAndLockValue, setCustomFieldMessages, setDefaultMessagePosition, setDefaultMessageVisibility, setEditingMode, setRequired, setRequiredIfVisibleAndEditable, setValue, setValueChangedByClient, setVisible, validate
-
Methods inherited from class org.teamapps.ux.component.AbstractComponent
createUiReference, getDebuggingId, getId, getParent, getSessionContext, isRendered, isVisible, mapAbstractUiComponentProperties, queueCommandIfRendered, render, reRenderIfRendered, setAttribute, setCssStyle, setDebuggingId, setParent, toggleCssClass, toString, unrender
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.teamapps.ux.component.ClientObject
handleUiQuery
-
Methods inherited from interface org.teamapps.ux.component.Component
setAriaLabel, setAttribute, setCssStyle, setHtmlTitle, setMargin, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setShadow, toggleCssClass
-
Methods inherited from interface org.teamapps.ux.component.field.TextInputHandlingField
defaultHandleTextInputEvent
-
-
-
-
Field Detail
-
onTextInput
public final Event<java.lang.String> onTextInput
-
onSpecialKeyPressed
public final Event<SpecialKey> onSpecialKeyPressed
-
-
Method Detail
-
getMaxCharacters
public int getMaxCharacters()
-
setMaxCharacters
public TextField setMaxCharacters(int maxCharacters)
-
isShowClearButton
public boolean isShowClearButton()
-
setShowClearButton
public TextField setShowClearButton(boolean showClearButton)
-
getEmptyText
public java.lang.String getEmptyText()
-
setEmptyText
public TextField setEmptyText(java.lang.String emptyText)
-
isAutofill
public boolean isAutofill()
-
setAutofill
public void setAutofill(boolean autofill)
-
createUiComponent
public org.teamapps.dto.UiField createUiComponent()
- Specified by:
createUiComponentin classAbstractComponent
-
handleUiEvent
public void handleUiEvent(org.teamapps.dto.UiEvent event)
- Specified by:
handleUiEventin interfaceClientObject- Overrides:
handleUiEventin classAbstractField<java.lang.String>
-
isEmptyValue
public boolean isEmptyValue(java.lang.String value)
Description copied from class:AbstractFieldWhether this value be regarded as empty / "no user input". Override for field-specific behaviour.- Overrides:
isEmptyValuein classAbstractField<java.lang.String>- Returns:
- true if the value can be regarded as "empty".
-
onTextInput
public Event<java.lang.String> onTextInput()
- Specified by:
onTextInputin interfaceTextInputHandlingField
-
onSpecialKeyPressed
public Event<SpecialKey> onSpecialKeyPressed()
- Specified by:
onSpecialKeyPressedin interfaceTextInputHandlingField
-
-