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

java.lang.Object
  extended by org.kuali.rice.krad.uif.component.ConfigurableBase
      extended by org.kuali.rice.krad.uif.component.ComponentBase
          extended by org.kuali.rice.krad.uif.field.FieldBase
All Implemented Interfaces:
Serializable, Component, Configurable, ScriptEventSupport, Field, org.springframework.core.Ordered
Direct Known Subclasses:
ActionField, BlankField, DataField, ErrorsField, FieldGroup, GenericField, IframeField, ImageField, LabelField, LinkField, MessageField

public class FieldBase
extends ComponentBase
implements Field

Base class for Field implementations

Sets the component type name so that all field templates have a fixed contract

Holds a nested LabelField with configuration for rendering the label and configuration on label placement.

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
FieldBase()
           
 
Method Summary
 FieldSecurity getComponentSecurity()
          Field Security object that indicates what authorization (permissions) exist for the field
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 String getComponentTypeName()
          The name for the component type
 String getLabel()
          Label text for the field
 LabelField getLabelField()
          LabelField instance for the field
 UifConstants.Position getLabelPlacement()
          Indicates where the label is placed in relation to the field (valid options are LEFT, RIGHT, BOTTOM, and TOP
 String getShortLabel()
          Short label for the field
 boolean isLabelFieldRendered()
          Indicates whether the contained LabelField has been rendered as part of another field and thus should not be rendered with the attribute
 void performFinalize(View view, Object model, Component parent)
          The following finalization is performed: Set the labelForComponentId to this component id Set the label text on the label field from the field's label property Set the render property on the label's required message field if this field is marked as required If label placement is right, set render colon to false
 void performInitialization(View view, Object model)
          The following initialization is performed:
 void setLabel(String label)
          Setter for the field's label text
 void setLabelField(LabelField labelField)
          Setter for the field's label field
 void setLabelFieldRendered(boolean labelFieldRendered)
          Setter for the label field rendered indicator
 void setLabelPlacement(UifConstants.Position labelPlacement)
          Setter for the label's position in relation to the field (control if editable)
 void setShortLabel(String shortLabel)
          Setter for the field's short label text
 void setShowLabel(boolean showLabel)
          Sets whether the label should be displayed
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addStyleClass, appendToStyle, getAlign, getColSpan, getComponentModifiers, getComponentOptions, getComponentOptionsJSString, getComponentPrototypes, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getEventCode, getFactoryId, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshDiscloseMethodToCall, getRefreshWhenChanged, getRefreshWhenChangedControlNames, getRenderOutput, getRequired, getRowSpan, getStyle, getStyleClasses, getStyleClassesAsString, getSupportsOnBlur, getSupportsOnChange, getSupportsOnClick, getSupportsOnClose, getSupportsOnDblClick, getSupportsOnDocumentReady, getSupportsOnFocus, getSupportsOnKeyDown, getSupportsOnKeyPress, getSupportsOnKeyUp, getSupportsOnLoad, getSupportsOnMouseDown, getSupportsOnMouseMove, getSupportsOnMouseOut, getSupportsOnMouseOver, getSupportsOnMouseUp, getSupportsOnSubmit, getSupportsOnUnload, getTemplate, getTitle, getValign, getWidth, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefresh, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, performApplyModel, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAlign, setColSpan, setComponentModifiers, setComponentOptions, setComponentOptionsJSString, setComponentSecurity, setConditionalRefresh, setContext, setFactoryId, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setHidden, setId, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefresh, setRefreshDiscloseMethodToCall, setRefreshedByAction, setRefreshWhenChanged, setRender, setRenderOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setStyleClasses, setTemplate, setTitle, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.uif.component.ConfigurableBase
getPropertyExpression, getPropertyExpressions, setPropertyExpressions
 
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
addStyleClass, appendToStyle, getColSpan, getComponentModifiers, getComponentOptions, getComponentOptionsJSString, getComponentPrototypes, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getFactoryId, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshWhenChanged, getRefreshWhenChangedControlNames, getRenderOutput, getRequired, getRowSpan, getStyle, getStyleClasses, getTemplate, getTitle, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefresh, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, performApplyModel, pushAllToContext, pushObjectToContext, setColSpan, setComponentModifiers, setComponentOptions, setComponentOptionsJSString, setComponentSecurity, setConditionalRefresh, setContext, setFactoryId, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefresh, setRefreshedByAction, setRefreshWhenChanged, setRender, setRenderOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setStyleClasses, setTemplate, setTitle
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Configurable
getPropertyExpression, getPropertyExpressions, setPropertyExpressions
 
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, getSupportsOnBlur, getSupportsOnChange, getSupportsOnClick, getSupportsOnClose, getSupportsOnDblClick, getSupportsOnDocumentReady, getSupportsOnFocus, getSupportsOnKeyDown, getSupportsOnKeyPress, getSupportsOnKeyUp, getSupportsOnLoad, getSupportsOnMouseDown, getSupportsOnMouseMove, getSupportsOnMouseOut, getSupportsOnMouseOver, getSupportsOnMouseUp, getSupportsOnSubmit, getSupportsOnUnload, setOnBlurScript, setOnDocumentReadyScript, setOnLoadScript
 

Constructor Detail

FieldBase

public FieldBase()
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 ComponentBase
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)

performFinalize

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

Specified by:
performFinalize in interface Component
Overrides:
performFinalize in class ComponentBase
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)

getComponentTypeName

public final String getComponentTypeName()
Description copied from interface: Component
The name for the component type

This is used within the rendering layer to pass the component instance into the template. The component instance is exported under the name given by this method.

Specified by:
getComponentTypeName in interface Component
Returns:
String type name
See Also:
Component.getComponentTypeName()

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

getLabel

public String getLabel()
Description copied from interface: Field
Label text for the field

The label is generally used to identify the field in the user interface

Specified by:
getLabel in interface Field
Returns:
String label text
See Also:
Field.getLabel()

setLabel

public void setLabel(String label)
Description copied from interface: Field
Setter for the field's label text

Specified by:
setLabel in interface Field
See Also:
Field.setLabel(java.lang.String)

getShortLabel

public String getShortLabel()
Description copied from interface: Field
Short label for the field

For areas of the user interface that have limited area (such as table headers), the short label can be used to identify the field

Specified by:
getShortLabel in interface Field
Returns:
String short label
See Also:
Field.getShortLabel()

setShortLabel

public void setShortLabel(String shortLabel)
Description copied from interface: Field
Setter for the field's short label text

Specified by:
setShortLabel in interface Field
See Also:
Field.setShortLabel(java.lang.String)

setShowLabel

public void setShowLabel(boolean showLabel)
Sets whether the label should be displayed

Convenience method for configuration that sets the render indicator on the fields LabelField instance

Parameters:
showLabel - boolean true if label should be displayed, false if the label should not be displayed

getLabelField

public LabelField getLabelField()
Description copied from interface: Field
LabelField instance for the field

The label field contains the labeling text for the field in addition to configuration for rendering in the user interface (such as the styling for the label area)

Specified by:
getLabelField in interface Field
Returns:
LabelField instance
See Also:
Field.getLabelField()

setLabelField

public void setLabelField(LabelField labelField)
Description copied from interface: Field
Setter for the field's label field

Specified by:
setLabelField in interface Field
See Also:
Field.setLabelField(org.kuali.rice.krad.uif.field.LabelField)

getLabelPlacement

public UifConstants.Position getLabelPlacement()
Indicates where the label is placed in relation to the field (valid options are LEFT, RIGHT, BOTTOM, and TOP

Returns:
Position position of label

setLabelPlacement

public void setLabelPlacement(UifConstants.Position labelPlacement)
Setter for the label's position in relation to the field (control if editable)

Parameters:
labelPlacement -

isLabelFieldRendered

public boolean isLabelFieldRendered()
Description copied from interface: Field
Indicates whether the contained LabelField has been rendered as part of another field and thus should not be rendered with the attribute

Specified by:
isLabelFieldRendered in interface Field
Returns:
boolean true if the label field has been rendered, false if it should be rendered with the attribute
See Also:
Field.isLabelFieldRendered()

setLabelFieldRendered

public void setLabelFieldRendered(boolean labelFieldRendered)
Description copied from interface: Field
Setter for the label field rendered indicator

Specified by:
setLabelFieldRendered in interface Field
See Also:
Field.setLabelFieldRendered(boolean)

getComponentSecurity

public FieldSecurity getComponentSecurity()
Field Security object that indicates what authorization (permissions) exist for the field

Specified by:
getComponentSecurity in interface Component
Overrides:
getComponentSecurity in class ComponentBase
Returns:
FieldSecurity instance
See Also:
Component.getComponentSecurity()


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