Package org.exoplatform.webui.form
Class UIFormInputBase<T>
java.lang.Object
org.exoplatform.webui.core.UIComponent
org.exoplatform.webui.core.UIContainer
org.exoplatform.webui.form.UIFormInputBase<T>
- All Implemented Interfaces:
UIFormInput<T>
- Direct Known Subclasses:
UICheckBoxInput,UIFormCheckBoxInput,UIFormColorPicker,UIFormComboBox,UIFormDateTimeInput,UIFormHiddenInput,UIFormInputIconSelector,UIFormInputInfo,UIFormInputItemSelector,UIFormRadioBoxInput,UIFormStringInput,UIFormTextAreaInput,UIFormUploadInput,UIFormWYSIWYGInput,UIUploadInput
Created by The eXo Platform SARL Author : Tuan Nguyen tuan08@users.sourceforge.net Jun 6, 2006
The base class to create form elements. Extend it to create your own elements.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer
UIContainer.SelectTabActionListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected TA default value for this fieldstatic final booleanDeprecated.protected booleanWhether this field is disabled.static final booleanDeprecated.According to deprecation of thesetEditable(boolean)andsetEnable(boolean)methodsprotected booleanDeprecated.According to the deprecation of thesetEnable(boolean)method Whether this field is enabledprotected StringThe HTML 'name' attribute of this elementprotected booleanWhether this field is in read only modeThe type of value that is expectedThe list of validators for this form elementprotected TThe current value of this fieldFields inherited from class org.exoplatform.webui.core.UIComponent
AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent, USE_WEBUI_RESOURCES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUIFormInputBase(String name, String bindingField, Class<T> typeValue) -
Method Summary
Modifier and TypeMethodDescription<E extends Validator>
UIFormInputBase<T> addValidator(Class<E> clazz, Object... params) abstract voiddecode(Object input, WebuiRequestContext context) getHTMLAttribute(String name) getLabel()getName()getValue()booleanReturntrueif this input field is disabled.booleanDeprecated.UseisReadOnly()insteadbooleanisEnable()Deprecated.UseisDisabled()insteadbooleanbooleanReturntrueif this input field is read only.booleanisValid()final voidprocessDecode(WebuiRequestContext context) protected voidvoidreset()voidvoidsetDefaultValue(T defaultValue) setDisabled(boolean disabled) Specifies that this input field should be disabled OR NOT.setEditable(boolean editable) Deprecated.UsesetReadOnly(boolean)insteadsetEnable(boolean enable) Deprecated.UsesetDisabled(boolean)insteadvoidsetHTMLAttribute(String name, String value) voidvoidsetReadOnly(boolean readonly) Specifies that this input field should be read-only OR NOT.Methods inherited from class org.exoplatform.webui.core.UIContainer
addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypesMethods inherited from class org.exoplatform.webui.core.UIComponent
broadcast, buildModelObject, createEvent, createUIComponent, createUIComponent, createUIComponent, doAsync, event, event, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getParent, getTemplate, getTemplateResourceResolver, getUIComponentName, isRendered, loadConfirmMesssage, processAction, processRender, renderEventURL, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibling, url, url, url
-
Field Details
-
ENABLE
Deprecated.According to deprecation of thesetEditable(boolean)andsetEnable(boolean)methods- See Also:
-
DISABLE
Deprecated.According to deprecation of thesetEditable(boolean)andsetEnable(boolean)methods- See Also:
-
name
The HTML 'name' attribute of this element -
bindingField
-
validators
The list of validators for this form element -
defaultValue_
A default value for this field -
value_
The current value of this field -
typeValue_
The type of value that is expected -
enable_
Deprecated.According to the deprecation of thesetEnable(boolean)method Whether this field is enabled -
disabled
protected boolean disabledWhether this field is disabled. -
readonly_
protected boolean readonly_Whether this field is in read only mode
-
-
Constructor Details
-
UIFormInputBase
-
UIFormInputBase
protected UIFormInputBase()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceUIFormInput<T>- Overrides:
getNamein classUIComponent
-
setName
-
getBindingField
- Specified by:
getBindingFieldin interfaceUIFormInput<T>
-
setBindingField
-
getDefaultValue
-
setDefaultValue
-
getValue
- Specified by:
getValuein interfaceUIFormInput<T>
-
setValue
- Specified by:
setValuein interfaceUIFormInput<T>
-
getTypeValue
- Specified by:
getTypeValuein interfaceUIFormInput<T>
-
reset
public void reset()- Specified by:
resetin interfaceUIFormInput<T>
-
isEnable
Deprecated.UseisDisabled()instead- Returns:
-
setEnable
Deprecated.UsesetDisabled(boolean)instead- Parameters:
enable-- Returns:
-
isDisabled
public boolean isDisabled()Returntrueif this input field is disabled. Otherwise, returnfalse.- Returns:
- True if this input field is disabled. Otherwise, return false.
-
setDisabled
Specifies that this input field should be disabled OR NOT.- Parameters:
disabled-- Returns:
-
isEditable
Deprecated.UseisReadOnly()instead- Returns:
- True if the input is read only. Otherwise, return false.
-
setEditable
Deprecated.UsesetReadOnly(boolean)instead- Parameters:
editable-- Returns:
-
isReadOnly
public boolean isReadOnly()Returntrueif this input field is read only. Otherwise, returnfalse.- Returns:
- True if the input is read only. Otherwise, return false.
-
setReadOnly
Specifies that this input field should be read-only OR NOT.- Parameters:
readonly-- Returns:
-
isValid
public boolean isValid() -
addValidator
public <E extends Validator> UIFormInputBase<T> addValidator(Class<E> clazz, Object... params) throws Exception - Specified by:
addValidatorin interfaceUIFormInput<T>- Throws:
Exception
-
getValidators
- Specified by:
getValidatorsin interfaceUIFormInput<T>
-
processDecode
- Overrides:
processDecodein classUIComponent- Throws:
Exception
-
isMandatory
public boolean isMandatory() -
decode
-
getLabel
- Specified by:
getLabelin interfaceUIFormInput<T>
-
setLabel
-
getHTMLAttribute
-
setHTMLAttribute
-
renderHTMLAttributes
- Throws:
IOException
-
setEditable(boolean)andsetEnable(boolean)methods