org.kuali.rice.krad.uif.control
Class TextControl

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.component.ComponentBase
              extended by org.kuali.rice.krad.uif.element.ContentElementBase
                  extended by org.kuali.rice.krad.uif.control.ControlBase
                      extended by org.kuali.rice.krad.uif.control.TextControl
All Implemented Interfaces:
Serializable, Cloneable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, Control, SizedControl, ContentElement, org.springframework.core.Ordered
Direct Known Subclasses:
GroupControl, SpinnerControl, UserControl

public class TextControl
extends ControlBase
implements SizedControl

Represents a HTML Text control, generally rendered as a input field of type 'text'. This can display and receive a single value

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
TextControl()
           
 
Method Summary
protected
<T> void
copyProperties(T component)
          Copies the properties over for the copy method
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 DatePicker getDatePicker()
          Renders a calendar that can be used to select a date value for the text control.
 Integer getMaxLength()
          Maximum number of characters that can be inputted
 Integer getMinLength()
          Minimum number of characters that can be inputted
 int getSize()
          Retrieves the configured size for the control, which reflects the display width in characters for the control within the UI
 String getWatermarkText()
          Gets the watermark text for this TextControl.
 boolean isTextExpand()
          If set to true, this control will have a button which can be clicked to expand the text area through a popup window so the user has more space to type and see the data they are entering in this text field.
 void performFinalize(View view, Object model, Component parent)
          The following actions are performed: Defaults maxLength, minLength (if not set) to maxLength of parent field
 void setDatePicker(DatePicker datePicker)
          Setter for the date picker
 void setMaxLength(Integer maxLength)
          Setter for the max number of input characters
 void setMinLength(Integer minLength)
          Setter for the min number of input characters
 void setSize(int size)
          Sets the size for the control
 void setTextExpand(boolean textExpand)
          Sets whether this control will have a button to expand the text area through a popup window.
 void setWatermarkText(String watermarkText)
          Sets the watermark text for this TextControl
 
Methods inherited from class org.kuali.rice.krad.uif.control.ControlBase
completeValidation, getComponentTypeName, getDisabledConditionControlNames, getDisabledConditionJs, getDisabledExpression, getDisabledReason, getDisabledWhenChangedPropertyNames, getEnabledWhenChangedPropertyNames, getTabIndex, isDisabled, isEvaluateDisabledOnKeyUp, performApplyModel, setDisabled, setDisabledConditionControlNames, setDisabledConditionJs, setDisabledExpression, setDisabledReason, setDisabledWhenChangedPropertyNames, setEnabledWhenChangedPropertyNames, setEvaluateDisabledOnKeyUp, setTabIndex
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, isUseAjaxCallForContent, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setUseAjaxCallForContent, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getLabelFromCamelCasedName, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isUseAjaxCallForContent, performInitialization, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setUseAjaxCallForContent, setValign, setWidth
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
 

Constructor Detail

TextControl

public TextControl()
Method Detail

getComponentsForLifecycle

public List<Component> getComponentsForLifecycle()
Description copied from interface: Component
List of components that are contained within the component and should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Specified by:
getComponentsForLifecycle in interface Component
Overrides:
getComponentsForLifecycle in class ComponentBase
Returns:
List child components
See Also:
ComponentBase.getComponentsForLifecycle()

performFinalize

public void performFinalize(View view,
                            Object model,
                            Component parent)
The following actions are performed:

Specified by:
performFinalize in interface Component
Overrides:
performFinalize in class ControlBase
Parameters:
view - view instance that should be finalized for rendering
model - top level object containing the data
parent - parent component
See Also:
ComponentBase.performFinalize(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

getSize

public int getSize()
Description copied from interface: SizedControl
Retrieves the configured size for the control, which reflects the display width in characters for the control within the UI

Specified by:
getSize in interface SizedControl
Returns:
int control size
See Also:
SizedControl.getSize()

setSize

public void setSize(int size)
Description copied from interface: SizedControl
Sets the size for the control

Specified by:
setSize in interface SizedControl
See Also:
SizedControl.setSize(int)

getMaxLength

public Integer getMaxLength()
Maximum number of characters that can be inputted

If not set on control, max length of field will be used

Returns:
max number of characters

setMaxLength

public void setMaxLength(Integer maxLength)
Setter for the max number of input characters

Parameters:
maxLength -

getMinLength

public Integer getMinLength()
Minimum number of characters that can be inputted

If not set on control, min length of field will be used

Returns:
max number of characters

setMinLength

public void setMinLength(Integer minLength)
Setter for the min number of input characters

Parameters:
minLength -

getDatePicker

public DatePicker getDatePicker()
Renders a calendar that can be used to select a date value for the text control. The Calendar instance contains configuration such as the date format string

Returns:
Calendar

setDatePicker

public void setDatePicker(DatePicker datePicker)
Setter for the date picker

Parameters:
datePicker -

getWatermarkText

public String getWatermarkText()
Gets the watermark text for this TextControl.

A watermark typically appears as light gray text within the text input element whenever the element is empty and does not have focus. This provides a hint to the user as to what the input is used for, or the type of input that is required.

Returns:
the watermarkText

setWatermarkText

public void setWatermarkText(String watermarkText)
Sets the watermark text for this TextControl

Parameters:
watermarkText - the watermarkText to set

isTextExpand

public boolean isTextExpand()
If set to true, this control will have a button which can be clicked to expand the text area through a popup window so the user has more space to type and see the data they are entering in this text field.

Returns:
the textExpand

setTextExpand

public void setTextExpand(boolean textExpand)
Sets whether this control will have a button to expand the text area through a popup window.

Parameters:
textExpand - the textExpand to set

copyProperties

protected <T> void copyProperties(T component)
Description copied from class: ComponentBase
Copies the properties over for the copy method

Overrides:
copyProperties in class ControlBase
Parameters:
component - base bean
See Also:
ComponentBase.copy()


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.