Package org.kuali.rice.krad.uif.element
Class Label
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,Component,Ordered,ScriptEventSupport,ContentElement,LifecycleElement,org.springframework.core.Ordered
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:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptionsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCodeFields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.Gets the inlineComponents used by index in a Label that has rich message component index tags in its labelTextIndicates the id for the component the label applies toText that will display as the labelString indicator that will be displayed as a required indicatorGets the Message that represents the rich message content of the label if labelText is using rich message tags.booleanIndicates 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 valuebooleanTrue if the indicator will be displayed when this label is first render, false otherwise.voidperformApplyModel(Object model, LifecycleElement parent) Sets up rich message content for the label, if any exists The following updates are done here: Evaluate the progressive render condition (if set) and combine with the current render status to set the render status Called after the initialize phase to perform conditional logic based on the model datavoidperformFinalize(Object model, LifecycleElement parent) The following finalization is performed: If label text is blank, set render to false for field Set the requiredIndicator 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 the label is hidden then add CSS class to render off screen for accessibility The following finalization is done here: progressiveRender and conditionalRefresh variables are processed if set If any of the style properties were given, sets the style string on the style property Set the skipInTabOrder flag for nested components The last phase before the view is renderedvoidsetInlineComponents(List<Component> inlineComponents) Sets the inlineComponents used by index in a Label that has rich message component index tags in its labelTextvoidsetLabelForComponentId(String labelForComponentId) Setter for the component id the label applies tovoidsetLabelText(String labelText) Setter for the label textvoidsetRenderColon(boolean renderColon) Setter for the render colon indicatorvoidsetRenderRequiredIndicator(boolean renderRequiredIndicator) voidsetRequiredIndicator(String requiredIndicator) voidsetRichLabelMessage(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
afterEvaluateExpression, getComponentTypeNameMethods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContainerIdSuffix, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, 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, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContainerIdSuffix, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setExcludeIf, setExcludeUnless, setFieldsToSendOnRefresh, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOmitFromFormPost, 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, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.uif.component.Component
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, getCanCopyOnReadOnly, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getCssGridSizes, getDataAttributes, getEventHandlerScript, getExcludeIf, getExcludeUnless, getFieldsToSendOnRefresh, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getReadOnly, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRole, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isOmitFromFormPost, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, setCanCopyOnReadOnly, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setCssGridSizes, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFieldsToSendOnRefresh, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOmitFromFormPost, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRole, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyleMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycleMethods 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, setOnUnloadScriptMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
Label
public Label()
-
-
Method Details
-
performApplyModel
Sets up rich message content for the label, if any exists The following updates are done here:- Evaluate the progressive render condition (if set) and combine with the current render status to set the render status
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classComponentBase- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
performFinalize
The following finalization is performed:- If label text is blank, set render to false for field
- Set the requiredIndicator
- 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 the label is hidden then add CSS class to render off screen for accessibility
- progressiveRender and conditionalRefresh variables are processed if set
- If any of the style properties were given, sets the style string on the style property
- Set the skipInTabOrder flag for nested components
Here final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classComponentBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
getLabelForComponentId
Indicates the id for the component the label applies toUsed for setting the labelFor attribute of the corresponding HTML element. Note this gets set automatically by the framework during the initialize phase
- Returns:
- component id
-
setLabelForComponentId
Setter for the component id the label applies to- Parameters:
labelForComponentId-
-
getLabelText
Text that will display as the label- Returns:
- label text
-
setLabelText
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:
- 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-
-
isRenderRequiredIndicator
public boolean isRenderRequiredIndicator()True if the indicator will be displayed when this label is first render, false otherwise.This is set by the framework based on required constraint state, and generally should NOT be set in most cases.
- Returns:
- true if rendering, false otherwise
-
setRenderRequiredIndicator
public void setRenderRequiredIndicator(boolean renderRequiredIndicator) - Parameters:
renderRequiredIndicator-- See Also:
-
getRequiredIndicator
String indicator that will be displayed as a required indicatorTo indicate a field must have a value (required input) the required indicator can be set to display an indicator or text along with the label.
- Returns:
- the required indicator String to display
-
setRequiredIndicator
- Parameters:
requiredIndicator-- See Also:
-
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:
- rich message structure, null if no rich message structure
-
setRichLabelMessage
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
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
Sets the inlineComponents used by index in a Label that has rich message component index tags in its labelText- Parameters:
inlineComponents-
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Specified by:
completeValidationin interfaceComponent- Overrides:
completeValidationin classComponentBase- Parameters:
tracer- Record of component's location
-