org.kuali.rice.krad.uif.field
Class InputField

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.field.FieldBase
                  extended by org.kuali.rice.krad.uif.field.DataField
                      extended by org.kuali.rice.krad.uif.field.InputField
All Implemented Interfaces:
Serializable, Cloneable, DictionaryBean, UifDictionaryBean, CaseConstrainable, Constrainable, MustOccurConstrainable, PrerequisiteConstrainable, SimpleConstrainable, ValidCharactersConstrainable, Component, DataBinding, ScriptEventSupport, Field, Helpable, org.springframework.core.Ordered
Direct Known Subclasses:
LookupInputField

public class InputField
extends DataField
implements SimpleConstrainable, CaseConstrainable, PrerequisiteConstrainable, MustOccurConstrainable, ValidCharactersConstrainable

Field that encapsulates data input/output captured by an attribute within the application

The InputField provides the majority of the data input/output for the screen. Through these fields the model can be displayed and updated. For data input, the field contains a Control instance will render an HTML control element(s). The input field also contains a Label, summary, and widgets such as a quickfinder (for looking up values) and inquiry (for getting more information on the value). InputField instances can have associated messages (errors) due to invalid input or business rule failures. Security can also be configured to restrict who may view the fields valnue.

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

Field Summary
 
Fields inherited from class org.kuali.rice.krad.uif.field.DataField
readOnlyDisplayReplacementPropertyName, readOnlyDisplaySuffixPropertyName
 
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
InputField()
           
 
Method Summary
protected  void adjustMustOccurConstraintBinding(List<MustOccurConstraint> mustOccurConstraints)
          Adjust paths on the must occur constrain bindings
protected  void adjustPrerequisiteConstraintBinding(List<PrerequisiteConstraint> prerequisiteConstraints)
          Adjust paths on the prerequisite constraint bindings
protected  void buildAutomaticQuickfinder(View view, Object model)
          Creates a new QuickFinder and then invokes the lifecycle process for the quickfinder to determine if a relationship was found, if so the quickfinder is assigned to the field
 void completeValidation(ValidationTrace tracer)
          Validates different requirements of component compiling a series of reports detailing information on errors found in the component.
 void copyFromAttributeDefinition(View view, AttributeDefinition attributeDefinition)
          Defaults the properties of the InputField to the corresponding properties of its AttributeDefinition retrieved from the dictionary (if such an entry exists).
protected
<T> void
copyProperties(T component)
          Copies the properties over for the copy method
 AttributeQuery getAttributeQuery()
          Attribute query instance configured for this field to dynamically pull information back for updates other fields or providing messages
 CaseConstraint getCaseConstraint()
          The CaseConstraint that applies to this InputField
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 Message getConstraintMessage()
          Message field that displays constraint text
 String getConstraintText()
          Text that display a restriction on the value a field can hold
 Control getControl()
          Control instance that should be used to input data for the field
 DataType getDataType()
          Gets the DataType of this InputField, note that DataType set to be date when this field is using a date picker with a TextControl and has not otherwise been explicitly set.
 List<PrerequisiteConstraint> getDependencyConstraints()
          List of PrerequisiteConstraint that apply to this InputField
 String getExclusiveMin()
          The exclusive minimum value for numeric or date field.
 String getInclusiveMax()
          The inclusive maximum value for numeric or date field.
 Message getInstructionalMessage()
          Message field that displays instructional text
 String getInstructionalText()
          Instructional text that display an explanation of the field usage
 Integer getMaxLength()
          Maximum number of characters the input field value is allowed to have
 Integer getMinLength()
          Minimum number of characters the input field value needs to be
 List<MustOccurConstraint> getMustOccurConstraints()
          List of MustOccurConstraint that apply to this InputField
 KeyValuesFinder getOptionsFinder()
          Instance of KeyValuesFinder that should be invoked to provide a List of values the field can have.
 Class<? extends KeyValuesFinder> getOptionsFinderClass()
          Get the class of the optionsFinder being used by this InputField
 List<PrerequisiteConstraint> getPrerequisiteConstraints()
           
 QuickFinder getQuickfinder()
          Lookup finder widget for the field
 Boolean getRequired()
          Indicates whether the component is required
 SimpleConstraint getSimpleConstraint()
          Simple constraints for the input field
 Suggest getSuggest()
          Suggest box widget for the input field
 ValidationMessages getValidationMessages()
          Field that contains the messages (errors) for the input field.
 ValidCharactersConstraint getValidCharactersConstraint()
          The ValidCharactersConstraint that applies to this InputField
 boolean isDisableNativeAutocomplete()
          Indicates whether the browser autocomplete functionality should be disabled for the input field (adds autocomplete="off")
 boolean isEnableAutoDirectInquiry()
          Indicates whether direct inquiries should be automatically set when a relationship for the field's property is found
 boolean isEnableAutoQuickfinder()
          Indicates whether quickfinders should be automatically set when a relationship for the field's property is found
 boolean isInputAllowed()
          Indicates whether the data field instance allows input, subclasses should override and set to true if input is allowed
 boolean isRenderFieldset()
           
 boolean isUppercaseValue()
          Perform uppercase flag for this field to force input to uppercase.
 boolean isWidgetInputOnly()
          Indicates indicates whether the field can only be updated through a widget widgetInputOnly behaves similar to ReadOnly with the exception that the value of the input field can be changed via the associated widget (e.g.
 void performApplyModel(View view, Object model, Component parent)
          The following updates are done here: If readOnlyHidden set to true, set field to readonly and add to hidden property names
 void performFinalize(View view, Object model, Component parent)
          The following actions are performed: Set the ids for the various attribute components Sets up the client side validation for constraints on this field.
 void performInitialization(View view, Object model)
          The following initialization is performed: Initializes instructional and constraint message fields if necessary
protected  void processReadOnlyListDisplay(Object model, List<?> originalList)
          Overrides processReadOnlyListDisplay to handle MultiValueControls by creating the list of values from values instead of the keys of the options selected (makes the list "human-readable").
protected  void setAlternateAndAdditionalDisplayValue(View view, Object model)
          Overridding to check quickfinder when masked is being applied.
 void setAttributeQuery(AttributeQuery attributeQuery)
          Setter for this field's attribute query
 void setCaseConstraint(CaseConstraint caseConstraint)
          Setter for caseConstraint
 void setConstraintMessage(Message constraintMessage)
          Setter for the constraint text message field
 void setConstraintText(String constraintText)
          Setter for the constraint message text
 void setControl(Control control)
          Setter for the field's control
 void setCustomValidatorClass(String customValidatorClass)
           
 void setDataType(DataType dataType)
          This does not have to be set, represents the DataType constraint of this field.
 void setDataType(String dataType)
           
 void setDependencyConstraints(List<PrerequisiteConstraint> dependencyConstraints)
          Setter for dependencyConstraints
 void setDisableNativeAutocomplete(boolean disableNativeAutocomplete)
          Setter to disable browser autocomplete for the input field
 void setEnableAutoDirectInquiry(boolean enableAutoDirectInquiry)
          Setter for enabling automatic direct inquiries
 void setEnableAutoQuickfinder(boolean enableAutoQuickfinder)
          Setter for enabling automatic quickfinders
 void setExclusiveMin(String exclusiveMin)
          Setter for the field's exclusive minimum value
 void setInclusiveMax(String inclusiveMax)
          Setter for the field's inclusive maximum value
 void setInstructionalMessage(Message instructionalMessage)
          Setter for the instructional text message field
 void setInstructionalText(String instructionalText)
          Setter for the instructional message
 void setMaxLength(Integer maxLength)
          Setter for input field max length
 void setMinLength(Integer minLength)
          Setter for input field minimum length
 void setMustOccurConstraints(List<MustOccurConstraint> mustOccurConstraints)
          Setter for mustOccurConstraints
 void setOptionsFinder(KeyValuesFinder optionsFinder)
          Setter for the field's KeyValuesFinder instance
 void setOptionsFinderClass(Class<? extends KeyValuesFinder> optionsFinderClass)
          Setter that takes in the class name for the options finder and creates a new instance to use as the finder for the input field
 void setQuickfinder(QuickFinder quickfinder)
          Setter for the lookup widget
 void setRequired(Boolean required)
          Setter for the required indicator
 void setSimpleConstraint(SimpleConstraint simpleConstraint)
          Setter for simple constraint
 void setSuggest(Suggest suggest)
          Setter for the fields suggest widget
protected  void setupFieldQuery()
          Performs setup of the field attribute query and informational display properties.
protected  void setupIds()
          Sets the ids on all components the input field uses so they will all contain this input field's id in their ids.
 void setUppercaseValue(boolean uppercaseValue)
          Setter for this field's performUppercase flag
 void setValidationMessages(ValidationMessages validationMessages)
          Setter for the input field's errors field
 void setValidCharactersConstraint(ValidCharactersConstraint validCharactersConstraint)
          Setter for validCharacterConstraint
 void setWidgetInputOnly(boolean widgetInputOnly)
          Setter for the widget input only indicator
 
Methods inherited from class org.kuali.rice.krad.uif.field.DataField
buildAutomaticInquiry, generateReadOnlyListDisplayReplacement, getAdditionalHiddenPropertyNames, getBindingInfo, getComponentSecurityClass, getDataFieldSecurity, getDefaultValue, getDefaultValueFinderClass, getDefaultValues, getDictionaryAttributeName, getDictionaryObjectEntry, getForcedValue, getHelp, getHelpSummary, getHelpTitle, getInquiry, getMaskFormatter, getName, getPropertyEditor, getPropertyName, getPropertyNamesForAdditionalDisplay, getReadOnlyDisplayReplacement, getReadOnlyDisplayReplacementPropertyName, getReadOnlyDisplaySuffix, getReadOnlyDisplaySuffixPropertyName, getReadOnlyListDelimiter, getReadOnlyListDisplayType, hasSecureValue, isAddHiddenWhenReadOnly, isApplyMask, isEnableAutoInquiry, isEscapeHtmlInPropertyValue, isMultiLineReadOnlyDisplay, setAddHiddenWhenReadOnly, setAdditionalHiddenPropertyNames, setApplyMask, setBindingInfo, setComponentSecurity, setDefaultValue, setDefaultValueFinderClass, setDefaultValues, setDictionaryAttributeName, setDictionaryObjectEntry, setEnableAutoInquiry, setEscapeHtmlInPropertyValue, setForcedValue, setHelp, setHelpSummary, setInquiry, setMaskFormatter, setMultiLineReadOnlyDisplay, setPropertyEditor, setPropertyEditorClass, setPropertyName, setPropertyNamesForAdditionalDisplay, setReadOnlyDisplayReplacement, setReadOnlyDisplayReplacementPropertyName, setReadOnlyDisplaySuffix, setReadOnlyDisplaySuffixPropertyName, setReadOnlyListDelimiter, setReadOnlyListDisplayType, setTooltipOfComponent
 
Methods inherited from class org.kuali.rice.krad.uif.field.FieldBase
getComponentTypeName, getFieldLabel, getFieldSecurity, getLabel, getLabelColSpan, getLabelPlacement, getLabelStyleClasses, getShortLabel, isLabelRendered, setFieldLabel, setLabel, setLabelColSpan, setLabelPlacement, setLabelRendered, setLabelStyleClasses, setNestedComponentIdAndSuffix, setShortLabel, setShowLabel
 
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, 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, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, 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, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, 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, 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.datadictionary.validation.capability.Constrainable
getName
 
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, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, 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

InputField

public InputField()
Method Detail

performInitialization

public void performInitialization(View view,
                                  Object model)
The following initialization is performed:

Specified by:
performInitialization in interface Component
Overrides:
performInitialization in class DataField
Parameters:
view - - view instance in which the component belongs
model - - object instance containing the view data
See Also:
ComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Component parent)
Description copied from class: DataField
The following updates are done here:

Specified by:
performApplyModel in interface Component
Overrides:
performApplyModel in class DataField
Parameters:
view - - view instance to which the component belongs
model - - Top level object containing the data (could be the form or a top level business object, dto)
See Also:
Component.performApplyModel(org.kuali.rice.krad.uif.view.View, Object, org.kuali.rice.krad.uif.component.Component)

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 DataField
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)

buildAutomaticQuickfinder

protected void buildAutomaticQuickfinder(View view,
                                         Object model)
Creates a new QuickFinder and then invokes the lifecycle process for the quickfinder to determine if a relationship was found, if so the quickfinder is assigned to the field

Parameters:
view - view instance being processed
model - object containing the view data

processReadOnlyListDisplay

protected void processReadOnlyListDisplay(Object model,
                                          List<?> originalList)
Overrides processReadOnlyListDisplay to handle MultiValueControls by creating the list of values from values instead of the keys of the options selected (makes the list "human-readable"). Otherwise it just passes the list ahead as normal if this InputField does not use a MultiValueControl.

Overrides:
processReadOnlyListDisplay in class DataField
Parameters:
model - the model
originalList - originalList of values

setAlternateAndAdditionalDisplayValue

protected void setAlternateAndAdditionalDisplayValue(View view,
                                                     Object model)
Overridding to check quickfinder when masked is being applied. If quickfinder is configured set the component to widgetInputOnly, else set to readOnlh

Overrides:
setAlternateAndAdditionalDisplayValue in class DataField
Parameters:
view - the current view instance
model - model instance
See Also:
DataField.setAlternateAndAdditionalDisplayValue(org.kuali.rice.krad.uif.view.View, java.lang.Object)

adjustMustOccurConstraintBinding

protected void adjustMustOccurConstraintBinding(List<MustOccurConstraint> mustOccurConstraints)
Adjust paths on the must occur constrain bindings

Parameters:
mustOccurConstraints -

adjustPrerequisiteConstraintBinding

protected void adjustPrerequisiteConstraintBinding(List<PrerequisiteConstraint> prerequisiteConstraints)
Adjust paths on the prerequisite constraint bindings

Parameters:
prerequisiteConstraints -

setupFieldQuery

protected void setupFieldQuery()
Performs setup of the field attribute query and informational display properties. Paths are adjusted to match the binding for the this field, and the necessary onblur script for triggering the query client side is constructed


setupIds

protected void setupIds()
Sets the ids on all components the input field uses so they will all contain this input field's id in their ids. This is useful for jQuery manipulation.


copyFromAttributeDefinition

public void copyFromAttributeDefinition(View view,
                                        AttributeDefinition attributeDefinition)
Defaults the properties of the InputField to the corresponding properties of its AttributeDefinition retrieved from the dictionary (if such an entry exists). If the field already contains a value for a property, the definitions value is not used.

Overrides:
copyFromAttributeDefinition in class DataField
Parameters:
view - view instance the field belongs to
attributeDefinition - AttributeDefinition instance the property values should be copied from

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 DataField
Returns:
List child components
See Also:
ComponentBase.getComponentsForLifecycle()

isInputAllowed

public boolean isInputAllowed()
Description copied from class: DataField
Indicates whether the data field instance allows input, subclasses should override and set to true if input is allowed

Overrides:
isInputAllowed in class DataField
Returns:
true if input is allowed, false if read only
See Also:
DataField.isInputAllowed()

getControl

public Control getControl()
Control instance that should be used to input data for the field

When the field is editable, the control will be rendered so the user can input a value(s). Controls typically are part of a Form and render standard HTML control elements such as text input, select, and checkbox

Returns:
Control instance

setControl

public void setControl(Control control)
Setter for the field's control

Parameters:
control -

getValidationMessages

public ValidationMessages getValidationMessages()
Field that contains the messages (errors) for the input field. The ValidationMessages holds configuration on associated messages along with information on rendering the messages in the user interface

Returns:
ValidationMessages instance

setValidationMessages

public void setValidationMessages(ValidationMessages validationMessages)
Setter for the input field's errors field

Parameters:
validationMessages -

getOptionsFinder

public KeyValuesFinder getOptionsFinder()
Instance of KeyValuesFinder that should be invoked to provide a List of values the field can have. Generally used to provide the options for a multi-value control or to validate the submitted field value

Returns:
KeyValuesFinder instance

setOptionsFinder

public void setOptionsFinder(KeyValuesFinder optionsFinder)
Setter for the field's KeyValuesFinder instance

Parameters:
optionsFinder -

getOptionsFinderClass

public Class<? extends KeyValuesFinder> getOptionsFinderClass()
Get the class of the optionsFinder being used by this InputField

Returns:
the class of the set optionsFinder, if not set or not applicable, returns null

setOptionsFinderClass

public void setOptionsFinderClass(Class<? extends KeyValuesFinder> optionsFinderClass)
Setter that takes in the class name for the options finder and creates a new instance to use as the finder for the input field

Parameters:
optionsFinderClass - the options finder class to set

isEnableAutoDirectInquiry

public boolean isEnableAutoDirectInquiry()
Indicates whether direct inquiries should be automatically set when a relationship for the field's property is found

Note this only applies when the DataField.getInquiry() widget has not been configured (is null) and is set to true by default

Returns:
true if auto direct inquiries are enabled, false if not

setEnableAutoDirectInquiry

public void setEnableAutoDirectInquiry(boolean enableAutoDirectInquiry)
Setter for enabling automatic direct inquiries

Parameters:
enableAutoDirectInquiry -

getQuickfinder

public QuickFinder getQuickfinder()
Lookup finder widget for the field

The quickfinder widget places a small icon next to the field that allows the user to bring up a search screen for finding valid field values. The Widget instance can be configured to point to a certain LookupView, or the framework will attempt to associate the field with a lookup based on its metadata (in particular its relationships in the model)

Returns:
QuickFinder lookup widget

setQuickfinder

public void setQuickfinder(QuickFinder quickfinder)
Setter for the lookup widget

Parameters:
quickfinder - the field lookup widget to set

isEnableAutoQuickfinder

public boolean isEnableAutoQuickfinder()
Indicates whether quickfinders should be automatically set when a relationship for the field's property is found

Note this only applies when the getQuickfinder() widget has not been configured (is null) and is set to true by default

Returns:
true if auto quickfinders are enabled, false if not

setEnableAutoQuickfinder

public void setEnableAutoQuickfinder(boolean enableAutoQuickfinder)
Setter for enabling automatic quickfinders

Parameters:
enableAutoQuickfinder -

getSuggest

public Suggest getSuggest()
Suggest box widget for the input field

If enabled (by render flag), as the user inputs data into the fields control a dynamic query is performed to provide the user suggestions on values which they can then select

Note the Suggest widget is only valid when using a standard TextControl

Returns:
Suggest instance

setSuggest

public void setSuggest(Suggest suggest)
Setter for the fields suggest widget

Parameters:
suggest - the field suggest widget to set

isWidgetInputOnly

public boolean isWidgetInputOnly()
Indicates indicates whether the field can only be updated through a widget widgetInputOnly behaves similar to ReadOnly with the exception that the value of the input field can be changed via the associated widget (e.g. spinner, date picker, quickfinder, etc).

Returns:
true if only widget input is allowed, false otherwise

setWidgetInputOnly

public void setWidgetInputOnly(boolean widgetInputOnly)
Setter for the widget input only indicator

Parameters:
widgetInputOnly -

getInstructionalText

public String getInstructionalText()
Instructional text that display an explanation of the field usage

Text explaining how to use the field, including things like what values should be selected in certain cases and so on (instructions)

Returns:
instructional message

setInstructionalText

public void setInstructionalText(String instructionalText)
Setter for the instructional message

Parameters:
instructionalText - the instructional text to set

getInstructionalMessage

public Message getInstructionalMessage()
Message field that displays instructional text

This message field can be configured to for adjusting how the instructional text will display. Generally the styleClasses property will be of most interest

Returns:
instructional message field

setInstructionalMessage

public void setInstructionalMessage(Message instructionalMessage)
Setter for the instructional text message field

Note this is the setter for the field that will render the instructional text. The actual text can be set on the field but can also be set using setInstructionalText(String)

Parameters:
instructionalMessage - the instructional message to set

getConstraintText

public String getConstraintText()
Text that display a restriction on the value a field can hold

For example when the value must be a valid format (phone number, email), certain length, min/max value and so on this text can be used to indicate the constraint to the user. Generally displays with the control so it is visible when the user tabs to the field

Returns:
text to display for the constraint message

setConstraintText

public void setConstraintText(String constraintText)
Setter for the constraint message text

Parameters:
constraintText - the constraint text to set

getConstraintMessage

public Message getConstraintMessage()
Message field that displays constraint text

This message field can be configured to for adjusting how the constrain text will display. Generally the styleClasses property will be of most interest

Returns:
constraint message field

setConstraintMessage

public void setConstraintMessage(Message constraintMessage)
Setter for the constraint text message field

Note this is the setter for the field that will render the constraint text. The actual text can be set on the field but can also be set using setConstraintText(String)

Parameters:
constraintMessage - the constrain message field to set

getValidCharactersConstraint

public ValidCharactersConstraint getValidCharactersConstraint()
The ValidCharactersConstraint that applies to this InputField

Specified by:
getValidCharactersConstraint in interface ValidCharactersConstrainable
Returns:
the valid characters constraint for this input field

setValidCharactersConstraint

public void setValidCharactersConstraint(ValidCharactersConstraint validCharactersConstraint)
Setter for validCharacterConstraint

Parameters:
validCharactersConstraint - the ValidCharactersConstraint to set

getCaseConstraint

public CaseConstraint getCaseConstraint()
The CaseConstraint that applies to this InputField

Specified by:
getCaseConstraint in interface CaseConstrainable
Returns:
the case constraint for this input field

setCaseConstraint

public void setCaseConstraint(CaseConstraint caseConstraint)
Setter for caseConstraint

Parameters:
caseConstraint - the CaseConstraint to set

getDependencyConstraints

public List<PrerequisiteConstraint> getDependencyConstraints()
List of PrerequisiteConstraint that apply to this InputField

Returns:
the dependency constraints for this input field

setDependencyConstraints

public void setDependencyConstraints(List<PrerequisiteConstraint> dependencyConstraints)
Setter for dependencyConstraints

Parameters:
dependencyConstraints - list of PrerequisiteConstraint to set

getPrerequisiteConstraints

public List<PrerequisiteConstraint> getPrerequisiteConstraints()
Specified by:
getPrerequisiteConstraints in interface PrerequisiteConstrainable

getMustOccurConstraints

public List<MustOccurConstraint> getMustOccurConstraints()
List of MustOccurConstraint that apply to this InputField

Specified by:
getMustOccurConstraints in interface MustOccurConstrainable
Returns:
the must occur constraints for this input field

setMustOccurConstraints

public void setMustOccurConstraints(List<MustOccurConstraint> mustOccurConstraints)
Setter for mustOccurConstraints

Parameters:
mustOccurConstraints - list of MustOccurConstraint to set

getSimpleConstraint

public SimpleConstraint getSimpleConstraint()
Simple constraints for the input field

A simple constraint which store the values for constraints such as required, min/max length, and min/max value.

Specified by:
getSimpleConstraint in interface SimpleConstrainable
Returns:
the simple constraint of the input field

setSimpleConstraint

public void setSimpleConstraint(SimpleConstraint simpleConstraint)
Setter for simple constraint

When a simple constraint is set on this object ALL simple validation constraints set directly will be overridden - recommended to use this or the other gets/sets for defining simple constraints, not both.

Parameters:
simpleConstraint - the simple constraint to set

setDataType

public void setDataType(DataType dataType)
This does not have to be set, represents the DataType constraint of this field. This is only checked during server side validation.

Parameters:
dataType - the dataType to set

setDataType

public void setDataType(String dataType)

getDataType

public DataType getDataType()
Gets the DataType of this InputField, note that DataType set to be date when this field is using a date picker with a TextControl and has not otherwise been explicitly set.

Returns:
DataType

getMaxLength

public Integer getMaxLength()
Maximum number of characters the input field value is allowed to have

The maximum length determines the maximum allowable length of the value for data entry editing purposes. The maximum length is inclusive and can be smaller or longer than the actual control size. The constraint is enforced on all data types (e.g. a numeric data type needs to meet the maximum length constraint in which digits and symbols are counted).

Returns:
the maximum length of the input field

setMaxLength

public void setMaxLength(Integer maxLength)
Setter for input field max length

Parameters:
maxLength - the maximum length to set

getMinLength

public Integer getMinLength()
Minimum number of characters the input field value needs to be

The minimum length determines the minimum required length of the value for data entry editing purposes. The minimum length is inclusive. The constraint is enforced on all data types (e.g. a numeric data type needs to meet the minimum length requirement in which digits and symbols are counted).

Returns:
the minimum length of the input field

setMinLength

public void setMinLength(Integer minLength)
Setter for input field minimum length

Parameters:
minLength - the minLength to set

getRequired

public Boolean getRequired()
Description copied from interface: Component
Indicates whether the component is required

At the general component level required means there is some action the user needs to take within the component. For example, within a section it might mean the fields within the section should be completed. At a field level, it means the field should be completed. This provides the ability for the renderers to indicate the required action.

Specified by:
getRequired in interface Component
Overrides:
getRequired in class ComponentBase
Returns:
boolean true if the component is required, false if it is not required
See Also:
ComponentBase.getRequired()

setRequired

public void setRequired(Boolean required)
Description copied from interface: Component
Setter for the required indicator

Specified by:
setRequired in interface Component
Overrides:
setRequired in class ComponentBase
See Also:
ComponentBase.setRequired(java.lang.Boolean)

getExclusiveMin

public String getExclusiveMin()
The exclusive minimum value for numeric or date field.

The exclusiveMin element determines the minimum allowable value for data entry editing purposes. This constrain is supported for numeric and date fields and to be used in conjunction with the appropriate ValidCharactersConstraint. For numeric constraint the value can be an integer or decimal such as -.001 or 99.

Returns:
the exclusive minimum numeric value of the input field

setExclusiveMin

public void setExclusiveMin(String exclusiveMin)
Setter for the field's exclusive minimum value

Parameters:
exclusiveMin - the minimum value to set

getInclusiveMax

public String getInclusiveMax()
The inclusive maximum value for numeric or date field.

The inclusiveMax element determines the maximum allowable value for data entry editing purposes. This constrain is supported for numeric and date fields and to be used in conjunction with the appropriate ValidCharactersConstraint. For numeric constraint the value can be an integer or decimal such as -.001 or 99.

Returns:
the inclusive maximum numeric value of the input field

setInclusiveMax

public void setInclusiveMax(String inclusiveMax)
Setter for the field's inclusive maximum value

Parameters:
inclusiveMax - the maximum value to set

getAttributeQuery

public AttributeQuery getAttributeQuery()
Attribute query instance configured for this field to dynamically pull information back for updates other fields or providing messages

If field attribute query is not null, associated event script will be generated to trigger the query from the UI. This will invoke the AttributeQueryService to execute the query and return an instance of AttributeQueryResult that is then read by the script to update the UI. Typically used to update informational property values or other field values

Returns:
AttributeQuery instance

setAttributeQuery

public void setAttributeQuery(AttributeQuery attributeQuery)
Setter for this field's attribute query

Parameters:
attributeQuery -

isUppercaseValue

public boolean isUppercaseValue()
Perform uppercase flag for this field to force input to uppercase.

It this flag is set to true the 'text-transform' style on the field will be set to 'uppercase' which will automatically change any text input into the field to uppercase.

Returns:
performUppercase flag

setUppercaseValue

public void setUppercaseValue(boolean uppercaseValue)
Setter for this field's performUppercase flag

Parameters:
uppercaseValue - boolean flag

isDisableNativeAutocomplete

public boolean isDisableNativeAutocomplete()
Indicates whether the browser autocomplete functionality should be disabled for the input field (adds autocomplete="off")

The browser's native autocomplete functionality can cause issues with security fields and also fields with the UIF suggest widget enabled

Returns:
true if the native autocomplete should be turned off for the input field, false if not

setDisableNativeAutocomplete

public void setDisableNativeAutocomplete(boolean disableNativeAutocomplete)
Setter to disable browser autocomplete for the input field

Parameters:
disableNativeAutocomplete -

isRenderFieldset

public boolean isRenderFieldset()
Overrides:
isRenderFieldset in class DataField

copyProperties

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

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

completeValidation

public void completeValidation(ValidationTrace tracer)
Description copied from interface: Component
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.

Specified by:
completeValidation in interface Component
Overrides:
completeValidation in class DataField
Parameters:
tracer - Record of component's location
See Also:
Component.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)

setCustomValidatorClass

public void setCustomValidatorClass(String customValidatorClass)


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