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

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.DataFieldBase
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, DataBinding, ScriptEventSupport, DataField, Field, LifecycleElement, Helpable, org.springframework.core.Ordered
Direct Known Subclasses:
InputFieldBase

public class DataFieldBase
extends FieldBase
implements DataField

Field that renders data from the application, such as the value of a data object property

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

Field Summary
protected  String readOnlyDisplayReplacementPropertyName
           
protected  String readOnlyDisplaySuffixPropertyName
           
 
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptions
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
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
DataFieldBase()
           
 
Method Summary
protected  void buildAutomaticInquiry(Object model, boolean enableDirectInquiry)
          Creates a new Inquiry and then invokes the lifecycle process for the inquiry to determine if a relationship was found, if so the inquiry 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(AttributeDefinition attributeDefinition)
          Defaults the properties of the DataField to the corresponding properties of its AttributeDefinition retrieved from the dictionary (if such an entry exists).
protected  String generateReadOnlyListDisplayReplacement(List<?> list)
          Generates the html to be used and sets the readOnlyDisplayReplacement for DataFields that contain lists and do not have their own readOnlyDisplayReplacement defined.
 List<String> getAdditionalHiddenPropertyNames()
          Allows specifying hidden property names without having to specify as a field in the group config (that might impact layout)
 BindingInfo getBindingInfo()
          Returns the BindingInfo instance that is configured for the component
 DataFieldSecurity getDataFieldSecurity()
          Data Field Security object that indicates what authorization (permissions) exist for the field
 Object getDefaultValue()
          Default value for the model property the field points to
 Class<? extends ValueFinder> getDefaultValueFinderClass()
          Gives Class that should be invoked to produce the default value for the field
 Object[] getDefaultValues()
          Array of default values for the model property the field points to
 String getDictionaryAttributeName()
          Name of the attribute within the data dictionary the attribute field is associated with
 String getDictionaryObjectEntry()
          Object entry name in the data dictionary the associated attribute is apart of
 String getForcedValue()
           
 Help getHelp()
          Help configuration object for the datafield
 String getHelpSummary()
          Summary help text for the field
 String getHelpTitle()
          Return the field label for the help title
 Inquiry getInquiry()
          Inquiry widget for the field
 MaskFormatter getMaskFormatter()
          MaskFormatter instance that will be used to mask the field value when isApplyMask() is true
 String getName()
          Returns the full binding path (the path used in the name attribute of the input).
 PropertyEditor getPropertyEditor()
          Performs formatting of the field value for display and then converting the value back to its expected type from a string
 String getPropertyName()
          Name of the property (relative to the parent object) the component binds to
 List<String> getPropertyNamesForAdditionalDisplay()
          List of property names whose values should be displayed read-only under this field
 String getReadOnlyDisplayReplacement()
          Returns the alternate display value
 String getReadOnlyDisplayReplacementPropertyName()
          Returns the alternate display attribute name to be displayed when the field is readonly.
 String getReadOnlyDisplaySuffix()
          Returns the additional display value.
 String getReadOnlyDisplaySuffixPropertyName()
          Returns the additional display attribute name to be displayed when the field is readonly
 String getReadOnlyListDelimiter()
          The readOnlyListDelimiter is used to set the delimiter used when "DELIMITED" type is set for readOnlyListDisplayType
 String getReadOnlyListDisplayType()
          Gets the readOnlyListDisplayType.
 boolean hasSecureValue()
          Indicates whether the value for the field is secure.
protected  void initializeComponentSecurity()
          Initializes (if necessary) the component security instance for the component type
 void initializePendingTasks(ViewLifecyclePhase phase, Queue<ViewLifecycleTask<?>> pendingTasks)
          Initialize the lifecycle task queue for custom tasks specific to this component on the given lifecycle phase.
 boolean isAddHiddenWhenReadOnly()
          Indicates the field should be read-only but also a hidden should be generated for the field
 boolean isApplyMask()
          Indicates whether the value for the field should be masked (or partially masked) on display
 boolean isEnableAutoInquiry()
          Indicates whether inquiries should be automatically set when a relationship for the field's property is found
 boolean isEscapeHtmlInPropertyValue()
          Returns true if HTML escape allowed for this field
 boolean isInputAllowed()
          Indicates whether the data field instance allows input, subclasses should override and set to true if input is allowed
 boolean isMultiLineReadOnlyDisplay()
          Returns true if this field is of type TextAreaControl.
 boolean isRenderFieldset()
           
 boolean isRenderInfoMessageSpan()
          When true, render the info message span which contains can contain additional information about the field (used by Field Query functionality)
 boolean isRenderMarkerIconSpan()
          When true, render the marker icon span to show icons related to the field (used by CompareFieldCreateModifier on maintenance documetnts to mark editted fields)
 void performApplyModel(Object model, LifecycleElement parent)
          The following updates are done here: If readOnlyHidden set to true, set field to readonly and add to hidden property names
 void performFinalize(Object model, LifecycleElement 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(Object model)
          The following initialization is performed: Set defaults for binding Default the model path if not set Initializes the component
protected  void processReadOnlyListDisplay(Object model, List<?> originalList)
          This method is called when the list is readOnly as determined in DataField's performFinalize method.
 void setAddHiddenWhenReadOnly(boolean addHiddenWhenReadOnly)
          Setter for the read-only hidden indicator
 void setAdditionalHiddenPropertyNames(List<String> additionalHiddenPropertyNames)
          Setter for the hidden property names
protected  void setAlternateAndAdditionalDisplayValue(View view, Object model)
          Sets alternate and additional property value for this field.
 void setApplyMask(boolean applyMask)
          Setter for the apply value mask flag
 void setBindingInfo(BindingInfo bindingInfo)
          Setter for the field's binding info
 void setComponentSecurity(ComponentSecurity componentSecurity)
          Override to assert a DataFieldSecurity instance is set
 void setDefaultValue(Object defaultValue)
          Setter for the fields default value
 void setDefaultValueFinderClass(Class<? extends ValueFinder> defaultValueFinderClass)
          Setter for the default value finder class
 void setDefaultValues(Object[] defaultValues)
          Setter for the fields default values
 void setDictionaryAttributeName(String dictionaryAttributeName)
          Setter for the dictionary attribute name
 void setDictionaryObjectEntry(String dictionaryObjectEntry)
          Setter for the dictionary object entry
 void setEnableAutoInquiry(boolean enableAutoInquiry)
          Setter for enabling automatic inquiries
 void setEscapeHtmlInPropertyValue(boolean escapeHtmlInPropertyValue)
          Sets HTML escaping for this property value.
 void setForcedValue(String forcedValue)
           
 void setHelp(Help help)
          Setter for the datafield help content
 void setHelpSummary(String helpSummary)
          Setter for the summary help text
 void setInquiry(Inquiry inquiry)
          Setter for the inquiry widget
 void setMaskFormatter(MaskFormatter maskFormatter)
          Setter for the MaskFormatter instance to apply when the value is masked
 void setMultiLineReadOnlyDisplay(boolean multiLineReadOnlyDisplay)
          Setter for multiLineReadOnlyDisplay
 void setPropertyEditor(PropertyEditor propertyEditor)
          Setter for the custom property editor to use for the field
 void setPropertyEditorClass(Class<? extends PropertyEditor> propertyEditorClass)
          Convenience setter for configuring a property editor by class
 void setPropertyName(String propertyName)
          Setter for the component's property name
 void setPropertyNamesForAdditionalDisplay(List<String> propertyNamesForAdditionalDisplay)
          Setter for the list of informational property names
 void setReadOnlyDisplayReplacement(String value)
          Setter for the alternative display value
 void setReadOnlyDisplayReplacementPropertyName(String readOnlyDisplayReplacementPropertyName)
          Sets the alternate display attribute name to be displayed when the field is readonly.
 void setReadOnlyDisplaySuffix(String value)
          Setter for the additional display value
 void setReadOnlyDisplaySuffixPropertyName(String readOnlyDisplaySuffixPropertyName)
          Additional display attribute name, which will be displayed next to the actual field value when the field is readonly with hyphen in between like PropertyValue - AdditionalPropertyValue
 void setReadOnlyListDelimiter(String readOnlyListDelimiter)
          Set the readOnlyListDelimiter
 void setReadOnlyListDisplayType(String readOnlyListDisplayType)
          Set the readOnlyListDisplayType
 void setRenderInfoMessageSpan(boolean renderInfoMessageSpan)
           
 void setRenderMarkerIconSpan(boolean renderMarkerIconSpan)
           
 void setTooltipOfComponent(Tooltip tooltip)
          For data fields the help tooltip is placed on the label.
 
Methods inherited from class org.kuali.rice.krad.uif.field.FieldBase
getComponentTypeName, getFieldLabel, getFieldLabelIfNotRendered, getFieldSecurity, getLabel, getLabelColSpan, getLabelPlacement, getLabelStyleClasses, getShortLabel, isEditInLineAuthz, isLabelRendered, isViewInLineAuthz, setEditInLineAuthz, setFieldLabel, setLabel, setLabelColSpan, setLabelPlacement, setLabelRendered, setLabelStyleClasses, setNestedComponentIdAndSuffix, setShortLabel, setShowLabel, setViewInLineAuthz
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, preventModification, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setCellWidth, setColSpan, setComponentModifiers, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycle
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode, unwrap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.field.Field
getFieldLabel, getFieldSecurity, getLabel, getLabelColSpan, getLabelStyleClasses, getShortLabel, isLabelRendered, setFieldLabel, setLabel, setLabelColSpan, setLabelRendered, setLabelStyleClasses, setShortLabel
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getComponentTypeName, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setCellWidth, setColSpan, setComponentModifiers, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, notifyCompleted, pushAllToContext, pushObjectToContext, setId, setPhasePathMapping, setViewPath, setViewStatus, skipLifecycle
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.Copyable
clone, copy, preventModification, unwrap
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
 

Field Detail

readOnlyDisplayReplacementPropertyName

protected String readOnlyDisplayReplacementPropertyName

readOnlyDisplaySuffixPropertyName

protected String readOnlyDisplaySuffixPropertyName
Constructor Detail

DataFieldBase

public DataFieldBase()
Method Detail

performInitialization

public void performInitialization(Object model)
The following initialization is performed: Initializes the component

Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.

Specified by:
performInitialization in interface LifecycleElement
Overrides:
performInitialization in class ComponentBase
Parameters:
model - - object instance containing the view data
See Also:
ComponentDefaultInitializeTask

performApplyModel

public void performApplyModel(Object model,
                              LifecycleElement parent)
The following updates are done here:

Specified by:
performApplyModel in interface LifecycleElement
Overrides:
performApplyModel in class ComponentBase
Parameters:
model - - Top level object containing the data (could be the form or a top level business object, dto)
parent - parent lifecycle element

performFinalize

public void performFinalize(Object model,
                            LifecycleElement parent)
The following actions are performed: The following finalization is performed: The following finalization is done here: The last phase before the view is rendered

Here final preparations can be made based on the updated view state.

Specified by:
performFinalize in interface LifecycleElement
Overrides:
performFinalize in class FieldBase
Parameters:
model - - top level object containing the data
parent - - parent component

initializePendingTasks

public void initializePendingTasks(ViewLifecyclePhase phase,
                                   Queue<ViewLifecycleTask<?>> pendingTasks)
Initialize the lifecycle task queue for custom tasks specific to this component on the given lifecycle phase.

Any tasks added to the queue by this method will be performed after the default lifecycle phase processing method LifecycleElement.performInitialization(Object), LifecycleElement.performApplyModel(Object, LifecycleElement), or LifecycleElement.performFinalize(Object, LifecycleElement) has been called.

Specified by:
initializePendingTasks in interface LifecycleElement
Overrides:
initializePendingTasks in class ComponentBase
Parameters:
phase - The lifecycle phase to queue pending tasks for.
pendingTasks - The pending task queue.
See Also:
LifecycleElement.initializePendingTasks(org.kuali.rice.krad.uif.lifecycle.ViewLifecyclePhase, java.util.Queue)

buildAutomaticInquiry

protected void buildAutomaticInquiry(Object model,
                                     boolean enableDirectInquiry)
Creates a new Inquiry and then invokes the lifecycle process for the inquiry to determine if a relationship was found, if so the inquiry is assigned to the field

Parameters:
model - object containing the view data
enableDirectInquiry - whether direct inquiry should be enabled if an inquiry is found

processReadOnlyListDisplay

protected void processReadOnlyListDisplay(Object model,
                                          List<?> originalList)
This method is called when the list is readOnly as determined in DataField's performFinalize method. This method should be overridden to perform any additional processing to the values before calling generateReadOnlyListDisplayReplacement. The default implementation calls it directly with the originalList.

Parameters:
model - the model
originalList - originalList of values

generateReadOnlyListDisplayReplacement

protected String generateReadOnlyListDisplayReplacement(List<?> list)
Generates the html to be used and sets the readOnlyDisplayReplacement for DataFields that contain lists and do not have their own readOnlyDisplayReplacement defined. The type of html generated is based on the options set on readOnlyListDisplayType and readOnlyListDelimiter.

Parameters:
list - the list to be converted to readOnly html

setAlternateAndAdditionalDisplayValue

protected void setAlternateAndAdditionalDisplayValue(View view,
                                                     Object model)
Sets alternate and additional property value for this field.

If AttributeSecurity present in this field, make sure the current user has permission to view the field value. If user doesn't have permission to view the value, mask the value as configured and set it as alternate value for display. If security doesn't exists for this field but alternateDisplayPropertyName present, get its value and format it based on that fields formatting and set for display.

For additional display value, if AttributeSecurity not present, sets the value if additionalDisplayPropertyName present. If not present, check whether this field is a KualiCode and get the relationship configured in the datadictionary file and set the name additional display value which will be displayed along with the code. If additional display property not present, check whether this field is has MultiValueControlBase. If yes, get the Label for the value and set it as additional display value.

Parameters:
view - the current view instance
model - model instance

copyFromAttributeDefinition

public void copyFromAttributeDefinition(AttributeDefinition attributeDefinition)
Defaults the properties of the DataField 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.

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

isInputAllowed

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

Specified by:
isInputAllowed in interface DataField
Returns:
true if input is allowed, false if read only

getPropertyName

public String getPropertyName()
Description copied from interface: DataBinding
Name of the property (relative to the parent object) the component binds to

Specified by:
getPropertyName in interface DataBinding
Returns:
String property name
See Also:
DataBinding.getPropertyName()

setPropertyName

public void setPropertyName(String propertyName)
Setter for the component's property name

Specified by:
setPropertyName in interface DataField
Parameters:
propertyName -

getPropertyEditor

public PropertyEditor getPropertyEditor()
Performs formatting of the field value for display and then converting the value back to its expected type from a string

Note property editors exist and are already registered for the basic Java types and the common Kuali types such as [@link KualiDecimal}. Registration with this property is only needed for custom property editors

Specified by:
getPropertyEditor in interface DataField
Returns:
PropertyEditor property editor instance to use for this field

setPropertyEditor

public void setPropertyEditor(PropertyEditor propertyEditor)
Setter for the custom property editor to use for the field

Specified by:
setPropertyEditor in interface DataField
Parameters:
propertyEditor -

setPropertyEditorClass

public void setPropertyEditorClass(Class<? extends PropertyEditor> propertyEditorClass)
Convenience setter for configuring a property editor by class

Specified by:
setPropertyEditorClass in interface DataField
Parameters:
propertyEditorClass -

getBindingInfo

public BindingInfo getBindingInfo()
Description copied from interface: DataBinding
Returns the BindingInfo instance that is configured for the component

Specified by:
getBindingInfo in interface DataBinding
Returns:
BindingInfo
See Also:
DataBinding.getBindingInfo()

setBindingInfo

public void setBindingInfo(BindingInfo bindingInfo)
Setter for the field's binding info

Specified by:
setBindingInfo in interface DataBinding
Parameters:
bindingInfo -

getName

public String getName()
Returns the full binding path (the path used in the name attribute of the input). This differs from propertyName in that it uses BindingInfo to determine the path.

Specified by:
getName in interface DataField
Returns:
full binding path name

getDictionaryAttributeName

public String getDictionaryAttributeName()
Name of the attribute within the data dictionary the attribute field is associated with

During the initialize phase for the View, properties for attribute fields are defaulted from a corresponding AttributeDefinition in the data dictionary. Based on the propertyName and parent object class the framework attempts will determine the attribute definition that is associated with the field and set this property. However this property can also be set in the fields configuration to use another dictionary attribute.

The attribute name is used along with the dictionary object entry to find the AttributeDefinition

Specified by:
getDictionaryAttributeName in interface DataField
Returns:
attribute name

setDictionaryAttributeName

public void setDictionaryAttributeName(String dictionaryAttributeName)
Setter for the dictionary attribute name

Specified by:
setDictionaryAttributeName in interface DataField
Parameters:
dictionaryAttributeName -

getDictionaryObjectEntry

public String getDictionaryObjectEntry()
Object entry name in the data dictionary the associated attribute is apart of

During the initialize phase for the View, properties for attribute fields are defaulted from a corresponding AttributeDefinition in the data dictionary. Based on the parent object class the framework will determine the object entry for the associated attribute. However the object entry can be set in the field's configuration to use another object entry for the attribute

The attribute name is used along with the dictionary object entry to find the AttributeDefinition

Specified by:
getDictionaryObjectEntry in interface DataField
Returns:
String

setDictionaryObjectEntry

public void setDictionaryObjectEntry(String dictionaryObjectEntry)
Setter for the dictionary object entry

Specified by:
setDictionaryObjectEntry in interface DataField
Parameters:
dictionaryObjectEntry -

getDefaultValue

public Object getDefaultValue()
Default value for the model property the field points to

When a new View instance is requested, the corresponding model will be newly created. During this initialization process the value for the model property will be set to the given default value, if it was null. This will only work on properties which can be determined to be null. Therefore a String property with an empty string value will not be ovewritten with the defaultValue set here.

In addition, int, boolean, and other primitive types will not use this default value because they inherently have a value in Java (0 for int, false for boolean, etc). To use such types either using a primitive wrapper type (Integer, Boolean, etc) so an unset variable can be determined to be null, or explicitly set the default value on the form/object itself for these types and not through this property.

Specified by:
getDefaultValue in interface DataField
Returns:
default value

setDefaultValue

public void setDefaultValue(Object defaultValue)
Setter for the fields default value

Specified by:
setDefaultValue in interface DataField
Parameters:
defaultValue -

getDefaultValueFinderClass

public Class<? extends ValueFinder> getDefaultValueFinderClass()
Gives Class that should be invoked to produce the default value for the field

Specified by:
getDefaultValueFinderClass in interface DataField
Returns:
default value finder class

setDefaultValueFinderClass

public void setDefaultValueFinderClass(Class<? extends ValueFinder> defaultValueFinderClass)
Setter for the default value finder class

Specified by:
setDefaultValueFinderClass in interface DataField
Parameters:
defaultValueFinderClass -

getDefaultValues

public Object[] getDefaultValues()
Array of default values for the model property the field points to

When a new View instance is requested, the corresponding model will be newly created. During this initialization process the value for the model property will be set to the given default values (if set)

Specified by:
getDefaultValues in interface DataField
Returns:
default value

setDefaultValues

public void setDefaultValues(Object[] defaultValues)
Setter for the fields default values

Specified by:
setDefaultValues in interface DataField
Parameters:
defaultValues -

getForcedValue

public String getForcedValue()
Specified by:
getForcedValue in interface DataField

setForcedValue

public void setForcedValue(String forcedValue)
Specified by:
setForcedValue in interface DataField

getHelpSummary

public String getHelpSummary()
Summary help text for the field

Specified by:
getHelpSummary in interface DataField
Returns:
summary help text

setHelpSummary

public void setHelpSummary(String helpSummary)
Setter for the summary help text

Specified by:
setHelpSummary in interface DataField
Parameters:
helpSummary -

getDataFieldSecurity

public DataFieldSecurity getDataFieldSecurity()
Data Field Security object that indicates what authorization (permissions) exist for the field

Specified by:
getDataFieldSecurity in interface DataField
Returns:
DataFieldSecurity instance

setComponentSecurity

public void setComponentSecurity(ComponentSecurity componentSecurity)
Override to assert a DataFieldSecurity instance is set

Specified by:
setComponentSecurity in interface Component
Specified by:
setComponentSecurity in interface DataField
Overrides:
setComponentSecurity in class FieldBase
Parameters:
componentSecurity - instance of DataFieldSecurity

initializeComponentSecurity

protected void initializeComponentSecurity()
Description copied from class: FieldBase
Initializes (if necessary) the component security instance for the component type

Overrides:
initializeComponentSecurity in class FieldBase
See Also:
ComponentBase.initializeComponentSecurity()

isAddHiddenWhenReadOnly

public boolean isAddHiddenWhenReadOnly()
Indicates the field should be read-only but also a hidden should be generated for the field

Useful for when a value is just displayed but is needed by script

Specified by:
isAddHiddenWhenReadOnly in interface DataField
Returns:
true if field should be readOnly hidden, false if not

setAddHiddenWhenReadOnly

public void setAddHiddenWhenReadOnly(boolean addHiddenWhenReadOnly)
Setter for the read-only hidden indicator

Specified by:
setAddHiddenWhenReadOnly in interface DataField
Parameters:
addHiddenWhenReadOnly -

getInquiry

public Inquiry getInquiry()
Inquiry widget for the field

The inquiry widget will render a link for the field value when read-only that points to the associated inquiry view for the field. The inquiry can be configured to point to a certain InquiryView, or the framework will attempt to associate the field with a inquiry based on its metadata (in particular its relationships in the model)

Specified by:
getInquiry in interface DataField
Returns:
Inquiry field inquiry

setInquiry

public void setInquiry(Inquiry inquiry)
Setter for the inquiry widget

Specified by:
setInquiry in interface DataField
Parameters:
inquiry -

isEnableAutoInquiry

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

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

Specified by:
isEnableAutoInquiry in interface DataField
Returns:
true if auto inquiries are enabled, false if not

setEnableAutoInquiry

public void setEnableAutoInquiry(boolean enableAutoInquiry)
Setter for enabling automatic inquiries

Specified by:
setEnableAutoInquiry in interface DataField
Parameters:
enableAutoInquiry -

getHelp

public Help getHelp()
Help configuration object for the datafield

External help information can be configured for the datafield. The Help object can the configuration for rendering a link to that help information.

Specified by:
getHelp in interface Helpable
Returns:
Help for datafield

setHelp

public void setHelp(Help help)
Setter for the datafield help content

Specified by:
setHelp in interface Helpable
Parameters:
help -

isRenderInfoMessageSpan

public boolean isRenderInfoMessageSpan()
When true, render the info message span which contains can contain additional information about the field (used by Field Query functionality)

Specified by:
isRenderInfoMessageSpan in interface DataField
Returns:
true if the span will be rendered, false otherwise

setRenderInfoMessageSpan

public void setRenderInfoMessageSpan(boolean renderInfoMessageSpan)
Specified by:
setRenderInfoMessageSpan in interface DataField
Parameters:
renderInfoMessageSpan -
See Also:
DataField.isRenderInfoMessageSpan()

isRenderMarkerIconSpan

public boolean isRenderMarkerIconSpan()
When true, render the marker icon span to show icons related to the field (used by CompareFieldCreateModifier on maintenance documetnts to mark editted fields)

Specified by:
isRenderMarkerIconSpan in interface DataField
Returns:
true if the the marker icon span will be rendered, false otherwise

setRenderMarkerIconSpan

public void setRenderMarkerIconSpan(boolean renderMarkerIconSpan)
Specified by:
setRenderMarkerIconSpan in interface DataField
Parameters:
renderMarkerIconSpan -
See Also:
DataField.isRenderMarkerIconSpan()

setTooltipOfComponent

public void setTooltipOfComponent(Tooltip tooltip)
For data fields the help tooltip is placed on the label.

Specified by:
setTooltipOfComponent in interface Helpable
Parameters:
tooltip - Tooltip with the help for the container
See Also:
org.kuali.rice.krad.uif.widget.Helpable#setTooltipOfComponent(org.kuali.rice.krad.uif.widget.Tooltip))

getHelpTitle

public String getHelpTitle()
Return the field label for the help title

Specified by:
getHelpTitle in interface Helpable
Returns:
field label
See Also:
Helpable.setTooltipOfComponent(org.kuali.rice.krad.uif.widget.Tooltip)

setReadOnlyDisplaySuffixPropertyName

public void setReadOnlyDisplaySuffixPropertyName(String readOnlyDisplaySuffixPropertyName)
Additional display attribute name, which will be displayed next to the actual field value when the field is readonly with hyphen in between like PropertyValue - AdditionalPropertyValue

Specified by:
setReadOnlyDisplaySuffixPropertyName in interface DataField
Parameters:
readOnlyDisplaySuffixPropertyName - name of the additional display property

getReadOnlyDisplaySuffixPropertyName

public String getReadOnlyDisplaySuffixPropertyName()
Returns the additional display attribute name to be displayed when the field is readonly

Specified by:
getReadOnlyDisplaySuffixPropertyName in interface DataField
Returns:
additional display attribute name

setReadOnlyDisplayReplacementPropertyName

public void setReadOnlyDisplayReplacementPropertyName(String readOnlyDisplayReplacementPropertyName)
Sets the alternate display attribute name to be displayed when the field is readonly. This properties value will be displayed instead of actual fields value when the field is readonly.

Specified by:
setReadOnlyDisplayReplacementPropertyName in interface DataField
Parameters:
readOnlyDisplayReplacementPropertyName - alternate display property name

getReadOnlyDisplayReplacementPropertyName

public String getReadOnlyDisplayReplacementPropertyName()
Returns the alternate display attribute name to be displayed when the field is readonly.

Specified by:
getReadOnlyDisplayReplacementPropertyName in interface DataField
Returns:
alternate Display Property Name

getReadOnlyDisplayReplacement

public String getReadOnlyDisplayReplacement()
Returns the alternate display value

Specified by:
getReadOnlyDisplayReplacement in interface DataField
Returns:
the alternate display value set for this field

setReadOnlyDisplayReplacement

public void setReadOnlyDisplayReplacement(String value)
Setter for the alternative display value

Specified by:
setReadOnlyDisplayReplacement in interface DataField
Parameters:
value -

getReadOnlyDisplaySuffix

public String getReadOnlyDisplaySuffix()
Returns the additional display value.

Specified by:
getReadOnlyDisplaySuffix in interface DataField
Returns:
the additional display value set for this field

setReadOnlyDisplaySuffix

public void setReadOnlyDisplaySuffix(String value)
Setter for the additional display value

Specified by:
setReadOnlyDisplaySuffix in interface DataField
Parameters:
value -

getReadOnlyListDisplayType

public String getReadOnlyListDisplayType()
Gets the readOnlyListDisplayType.

When this is not set, the list will default to the delimited list display with a default of comma and space (", ") - if readOnlyListDelimiter is not set as well. The type can be set as the following:

Specified by:
getReadOnlyListDisplayType in interface DataField
Returns:
the display type to use

setReadOnlyListDisplayType

public void setReadOnlyListDisplayType(String readOnlyListDisplayType)
Set the readOnlyListDisplayType

Specified by:
setReadOnlyListDisplayType in interface DataField
Parameters:
readOnlyListDisplayType -

getReadOnlyListDelimiter

public String getReadOnlyListDelimiter()
The readOnlyListDelimiter is used to set the delimiter used when "DELIMITED" type is set for readOnlyListDisplayType

Specified by:
getReadOnlyListDelimiter in interface DataField
Returns:
the delimiter to use in readOnly list output with "DELIMITED" type set

setReadOnlyListDelimiter

public void setReadOnlyListDelimiter(String readOnlyListDelimiter)
Set the readOnlyListDelimiter

Specified by:
setReadOnlyListDelimiter in interface DataField
Parameters:
readOnlyListDelimiter -

isApplyMask

public boolean isApplyMask()
Indicates whether the value for the field should be masked (or partially masked) on display

If set to true, the field value will be masked by applying the configured getMaskFormatter()

If a KIM permission exists that should be checked to determine whether the value should be masked or not, this value should not be set but instead the mask or partialMask property on ComponentBase.getComponentSecurity() should be set to true. This indicates there is a mask permission that should be consulted. If the user does not have the permission, this flag will be set to true by the framework and the value masked using the mask formatter configured on the security object

Specified by:
isApplyMask in interface DataField
Returns:
true if the field value should be masked, false if not

setApplyMask

public void setApplyMask(boolean applyMask)
Setter for the apply value mask flag

Specified by:
setApplyMask in interface DataField
Parameters:
applyMask -

getMaskFormatter

public MaskFormatter getMaskFormatter()
MaskFormatter instance that will be used to mask the field value when isApplyMask() is true

Note in cases where the mask is applied due to security (KIM permissions), the mask or partial mask formatter configured on ComponentBase.getComponentSecurity() will be used instead of this mask formatter

Specified by:
getMaskFormatter in interface DataField
Returns:
MaskFormatter instance

setMaskFormatter

public void setMaskFormatter(MaskFormatter maskFormatter)
Setter for the MaskFormatter instance to apply when the value is masked

Specified by:
setMaskFormatter in interface DataField
Parameters:
maskFormatter -

getAdditionalHiddenPropertyNames

public List<String> getAdditionalHiddenPropertyNames()
Allows specifying hidden property names without having to specify as a field in the group config (that might impact layout)

Specified by:
getAdditionalHiddenPropertyNames in interface DataField
Returns:
hidden property names

setAdditionalHiddenPropertyNames

public void setAdditionalHiddenPropertyNames(List<String> additionalHiddenPropertyNames)
Setter for the hidden property names

Specified by:
setAdditionalHiddenPropertyNames in interface DataField
Parameters:
additionalHiddenPropertyNames -

getPropertyNamesForAdditionalDisplay

public List<String> getPropertyNamesForAdditionalDisplay()
List of property names whose values should be displayed read-only under this field

In the attribute field template for each information property name given its values is outputted read-only. Informational property values can also be updated dynamically with the use of field attribute query

Simple property names can be given if the property has the same binding parent as this field, in which case the binding path will be adjusted by the framework. If the property names starts with org.kuali.rice.krad.uif.UifConstants#NO_BIND_ADJUST_PREFIX, no binding prefix will be added.

Specified by:
getPropertyNamesForAdditionalDisplay in interface DataField
Returns:
informational property names

setPropertyNamesForAdditionalDisplay

public void setPropertyNamesForAdditionalDisplay(List<String> propertyNamesForAdditionalDisplay)
Setter for the list of informational property names

Specified by:
setPropertyNamesForAdditionalDisplay in interface DataField
Parameters:
propertyNamesForAdditionalDisplay -

setEscapeHtmlInPropertyValue

public void setEscapeHtmlInPropertyValue(boolean escapeHtmlInPropertyValue)
Sets HTML escaping for this property value. HTML escaping will be handled in alternate and additional fields also.

Specified by:
setEscapeHtmlInPropertyValue in interface DataField

isEscapeHtmlInPropertyValue

public boolean isEscapeHtmlInPropertyValue()
Returns true if HTML escape allowed for this field

Specified by:
isEscapeHtmlInPropertyValue in interface DataField
Returns:
true if escaping allowed

isMultiLineReadOnlyDisplay

public boolean isMultiLineReadOnlyDisplay()
Returns true if this field is of type TextAreaControl.

Used to preserve text formatting in a textarea when the view is readOnly by enclosing the text in a tag.

Specified by:
isMultiLineReadOnlyDisplay in interface DataField
Returns:
true if the field is of type TextAreaControl

setMultiLineReadOnlyDisplay

public void setMultiLineReadOnlyDisplay(boolean multiLineReadOnlyDisplay)
Setter for multiLineReadOnlyDisplay

Specified by:
setMultiLineReadOnlyDisplay in interface DataField
Parameters:
multiLineReadOnlyDisplay -

hasSecureValue

public boolean hasSecureValue()
Indicates whether the value for the field is secure.

A value will be secured if masking has been applied (by configuration or a failed KIM permission) or the field has been marked as hidden due to a required KIM permission check failing.

Specified by:
hasSecureValue in interface DataField
Returns:
true if value is secure, false if not

isRenderFieldset

public boolean isRenderFieldset()
Specified by:
isRenderFieldset in interface DataField

completeValidation

public void completeValidation(ValidationTrace tracer)
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
Specified by:
completeValidation in interface DataField
Overrides:
completeValidation in class ComponentBase
Parameters:
tracer - Record of component's location
See Also:
Component.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.