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

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
              extended by org.kuali.rice.krad.uif.field.LabelField
All Implemented Interfaces:
Serializable, Component, Configurable, ScriptEventSupport, Field, org.springframework.core.Ordered

public class LabelField
extends FieldBase

Contains a label for another Field instance

The LabelField exists so that the label can be placed separate from the component in a layout manager such as the GridLayoutManager. It addition it can be used to style the label (from the inherited styleClass and style properties)

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
LabelField()
           
 
Method Summary
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 String getLabelForComponentId()
          Indicates the id for the component the label applies to
 String getLabelText()
          Text that will display as the label
 MessageField getRequiredMessageField()
          MessageField instance that will display a required indicator
 UifConstants.Position getRequiredMessagePlacement()
          Indicates where the required message field should be placed in relation to the label field, valid options are 'LEFT' and 'RIGHT'
 boolean isRenderColon()
          Indicates whether a colon should be rendered after the label text, generally used when the label appears to the left of the field's control or value
 void performFinalize(View view, Object model, Component parent)
          The following finalization is performed: If label text is blank, set render to false for field
 void setLabelForComponentId(String labelForComponentId)
          Setter for the component id the label applies to
 void setLabelText(String labelText)
          Setter for the label text
 void setRenderColon(boolean renderColon)
          Setter for the render colon indicator
 void setRequiredMessageField(MessageField requiredMessageField)
          Setter for the required message field
 void setRequiredMessagePlacement(UifConstants.Position requiredMessagePlacement)
          Setter for the required message field placement
 
Methods inherited from class org.kuali.rice.krad.uif.field.FieldBase
getComponentSecurityClass, getComponentTypeName, getFieldSecurity, getLabel, getLabelField, getLabelPlacement, getShortLabel, isLabelFieldRendered, performInitialization, setComponentSecurity, setLabel, setLabelField, setLabelFieldRendered, setLabelPlacement, setShortLabel, setShowLabel
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addStyleClass, appendToStyle, getAlign, getColSpan, getComponentModifiers, getComponentOptions, getComponentOptionsJSString, getComponentPrototypes, getComponentSecurity, 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, isPersistInSession, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefresh, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, performApplyModel, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAlign, setColSpan, setComponentModifiers, setComponentOptions, setComponentOptionsJSString, 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, setPersistInSession, 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, getComponentSecurity, 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, isPersistInSession, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefresh, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, performApplyModel, pushAllToContext, pushObjectToContext, setColSpan, setComponentModifiers, setComponentOptions, setComponentOptionsJSString, setConditionalRefresh, setContext, setFactoryId, setHidden, setId, setOrder, setPersistInSession, 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

LabelField

public LabelField()
Method Detail

performFinalize

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

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

getLabelForComponentId

public String getLabelForComponentId()
Indicates the id for the component the label applies to

Used for setting the labelFor attribute of the corresponding HTML element. Note this gets set automatically by the framework during the initialize phase

Returns:
String component id

setLabelForComponentId

public void setLabelForComponentId(String labelForComponentId)
Setter for the component id the label applies to

Parameters:
labelForComponentId -

getLabelText

public String getLabelText()
Text that will display as the label

Returns:
String label text

setLabelText

public void setLabelText(String labelText)
Setter for the label text

Parameters:
labelText -

isRenderColon

public boolean isRenderColon()
Indicates whether a colon should be rendered after the label text, generally used when the label appears to the left of the field's control or value

Returns:
boolean true if a colon should be rendered, false if it should not be

setRenderColon

public void setRenderColon(boolean renderColon)
Setter for the render colon indicator

Parameters:
renderColon -

getRequiredMessageField

public MessageField getRequiredMessageField()
MessageField instance that will display a required indicator

To indicate a field must have a value (required input) the required message field can be set to display an indicator or message along with the label. The message field also dictates the styling of the required message

Returns:
MessageField instance

setRequiredMessageField

public void setRequiredMessageField(MessageField requiredMessageField)
Setter for the required message field

Parameters:
requiredMessageField -

getRequiredMessagePlacement

public UifConstants.Position getRequiredMessagePlacement()
Indicates where the required message field should be placed in relation to the label field, valid options are 'LEFT' and 'RIGHT'

Returns:
Position the requiredMessage placement

setRequiredMessagePlacement

public void setRequiredMessagePlacement(UifConstants.Position requiredMessagePlacement)
Setter for the required message field placement

Parameters:
requiredMessagePlacement -


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