org.kuali.rice.krad.uif.element
Class Label

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.component.ComponentBase
              extended by org.kuali.rice.krad.uif.element.ContentElementBase
                  extended by org.kuali.rice.krad.uif.element.Label
All Implemented Interfaces:
Serializable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, ContentElement, org.springframework.core.Ordered

public class Label
extends ContentElementBase

Content element that renders a label

Contains options for adding a colon to the label along with a required message

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
Label()
           
 
Method Summary
 void completeValidation(ValidationTrace tracer)
          Validates different requirements of component compiling a series of reports detailing information on errors found in the component.
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 List<Component> getInlineComponents()
          Gets the inlineComponents used by index in a Label that has rich message component index tags in its labelText
 String getLabelForComponentId()
          Indicates the id for the component the label applies to
 String getLabelText()
          Text that will display as the label
 Message getRequiredMessage()
          Message 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'
 Message getRichLabelMessage()
          Gets the Message that represents the rich message content of the label if labelText is using rich message tags.
 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 performApplyModel(View view, Object model, Component parent)
          Sets up rich message content for the label, if any exists
 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 setInlineComponents(List<Component> inlineComponents)
          Sets the inlineComponents used by index in a Label that has rich message component index tags in its labelText
 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 setRequiredMessage(Message requiredMessage)
          Setter for the required message field
 void setRequiredMessagePlacement(UifConstants.Position requiredMessagePlacement)
          Setter for the required message field placement
 void setRichLabelMessage(Message richLabelMessage)
          Sets the Message that represents the rich message content of the label if it is using rich message tags.
 
Methods inherited from class org.kuali.rice.krad.uif.element.ContentElementBase
getComponentTypeName
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, 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.uif.component.Component
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, performInitialization, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, 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, setOnLoadScript
 

Constructor Detail

Label

public Label()
Method Detail

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Component parent)
Sets up rich message content for the label, if any exists

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

getRequiredMessage

public Message getRequiredMessage()
Message 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:
Message instance

setRequiredMessage

public void setRequiredMessage(Message requiredMessage)
Setter for the required message field

Parameters:
requiredMessage -

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 -

getRichLabelMessage

public Message getRichLabelMessage()
Gets the Message that represents the rich message content of the label if labelText is using rich message tags. DO NOT set this property directly unless you need full control over the message structure.

Returns:
Message with rich message structure, null if no rich message structure

setRichLabelMessage

public void setRichLabelMessage(Message richLabelMessage)
Sets the Message that represents the rich message content of the label if it is using rich message tags. DO NOT set this property directly unless you need full control over the message structure.

Parameters:
richLabelMessage -

getInlineComponents

public List<Component> getInlineComponents()
Gets the inlineComponents used by index in a Label that has rich message component index tags in its labelText

Returns:
the Label's inlineComponents

setInlineComponents

public void setInlineComponents(List<Component> inlineComponents)
Sets the inlineComponents used by index in a Label that has rich message component index tags in its labelText

Parameters:
inlineComponents -

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 ComponentBase
Parameters:
tracer - Record of component's location
See Also:
Component.completeValidation(org.kuali.rice.krad.datadictionary.validator.ValidationTrace)


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