org.kuali.rice.krad.uif.element
Class Message
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
org.kuali.rice.krad.uif.component.ComponentBase
org.kuali.rice.krad.uif.element.ContentElementBase
org.kuali.rice.krad.uif.element.Message
- All Implemented Interfaces:
- Serializable, Cloneable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, ContentElement, org.springframework.core.Ordered
public class Message
- extends ContentElementBase
Encapsulates a text message to be displayed
The Message
is used to display static text in the user
interface
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
- Serialized Form
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Method Summary |
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors
found in the component. |
protected
|
copyProperties(T component)
Copies the properties over for the copy method |
List<Component> |
getComponentsForLifecycle()
List of components that are contained within the component and should be sent through
the lifecycle |
List<Component> |
getInlineComponents()
The inlineComponents are a list of components in order by index. |
List<Component> |
getMessageComponentStructure()
The message component structure is a list of components which represent the components that make up a message
when using rich message functionality. |
String |
getMessageText()
Text that makes up the message that will be displayed. |
boolean |
isGenerateSpan()
If true, generate the span around this message (default). |
boolean |
isParseComponents()
Indicates if the inline components must be parsed for rich messages |
boolean |
isRender()
Override to render only if the message text has been given or there is a conditional expression on the
message text |
void |
performApplyModel(View view,
Object model,
Component parent)
Message perfom apply model parses message text for rich text functionality if the messageText contains
[ or ] special characters |
void |
performFinalize(View view,
Object model,
Component parent)
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
|
void |
setGenerateSpan(boolean generateSpan)
Sets the generate span flag |
void |
setInlineComponents(List<Component> inlineComponents)
Set the inlineComponents to be filled in at indexes referenced by [n] in the message |
void |
setMessageComponentStructure(List<Component> messageComponentStructure)
Set the message component structure. |
void |
setMessageText(String messageText)
Setter for the message text |
void |
setParseComponents(boolean parseComponents)
Sets the parse components flag to indicate if inline components must be parsed for rich messages |
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase |
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPostRenderContent, getPreRenderContent, 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, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth |
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, copy, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAlign, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, performInitialization, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth |
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, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript |
Message
public Message()
performApplyModel
public void performApplyModel(View view,
Object model,
Component parent)
- Message perfom apply model parses message text for rich text functionality if the messageText contains
[ or ] special characters
- Specified by:
performApplyModel
in interface Component
- Overrides:
performApplyModel
in class ComponentBase
- Parameters:
view
- - view instance to which the component belongsmodel
- - 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)
- Description copied from class:
ComponentBase
- 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
- Specified by:
performFinalize
in interface Component
- Overrides:
performFinalize
in class ComponentBase
- Parameters:
view
- - view instance that should be finalized for renderingmodel
- - top level object containing the dataparent
- - parent component- See Also:
Component.performFinalize(org.kuali.rice.krad.uif.view.View, Object, org.kuali.rice.krad.uif.component.Component)
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()
isRender
public boolean isRender()
- Override to render only if the message text has been given or there is a conditional expression on the
message text
- Specified by:
isRender
in interface Component
- Overrides:
isRender
in class ComponentBase
- Returns:
- boolean true if the component should be rendered, false if it
should not be
- See Also:
ComponentBase.isRender()
getMessageText
public String getMessageText()
- Text that makes up the message that will be displayed.
If special characters [] are detected the message inserts special content at that location.
The types of features supported are (note that <> are not part of the content below,
they specify placeholders):
- [id=<component id>] - insert component with id specified at that location in the message
- [n] - insert component at index n from the inlineComponent list
- [<html tag>][/<html tag>] - insert html content directly into the message content at that
location,
without the need to escape the <> characters in xml
- [color=<html color code/name>][/color] - wrap content in color tags to make text that color
in the message
- [css=<css classes>][/css] - apply css classes specified to the wrapped content - same as wrapping
the content in span with class property set
If the [] characters are needed in message text, they need to be declared with an escape character: \\[ \\]
- Returns:
- message text
setMessageText
public void setMessageText(String messageText)
- Setter for the message text
- Parameters:
messageText
-
isGenerateSpan
public boolean isGenerateSpan()
- If true, generate the span around this message (default). When false, skip span generation for this
message - this has the additional effect the css classes/style classes will be lost for this message.
- Returns:
- true if generating a wrapping span, false otherwise
setGenerateSpan
public void setGenerateSpan(boolean generateSpan)
- Sets the generate span flag
- Parameters:
generateSpan
-
getMessageComponentStructure
public List<Component> getMessageComponentStructure()
- The message component structure is a list of components which represent the components that make up a message
when using rich message functionality.
The structure represents the parsed messageText when not set. Normally this structure is setup by the Message
class and SHOULD NOT BE SET in xml, unless full control over the structure is needed.
- Returns:
- list of components which represent the message structure
setMessageComponentStructure
public void setMessageComponentStructure(List<Component> messageComponentStructure)
- Set the message component structure. This will override/ignore messageText when set. Normally
this SHOULD NOT BE SET by the xml configuration.
- Parameters:
messageComponentStructure
- list of components which represent the message structure
getInlineComponents
public List<Component> getInlineComponents()
- The inlineComponents are a list of components in order by index.
inlineComponents is only used when the message is using rich message functionality. A message
with [0] will reference component at index 0 of this list and insert it at that place in the message,
and likewise [1] will reference item 1, etc. If the index referenced is out of bounds (or list doesnt exist),
an error will be thrown during message parse.
- Returns:
- the inlineComponents to be filled in at indexes referenced by [n] in the message
setInlineComponents
public void setInlineComponents(List<Component> inlineComponents)
- Set the inlineComponents to be filled in at indexes referenced by [n] in the message
- Parameters:
inlineComponents
- the inlineComponents to be filled in at indexes referenced by [n] in the message
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)
isParseComponents
public boolean isParseComponents()
- Indicates if the inline components must be parsed for rich messages
- Returns:
- boolean
setParseComponents
public void setParseComponents(boolean parseComponents)
- Sets the parse components flag to indicate if inline components must be parsed for rich messages
- Parameters:
parseComponents
-
copyProperties
protected <T> void copyProperties(T component)
- Description copied from class:
ComponentBase
- Copies the properties over for the copy method
- Overrides:
copyProperties
in class ComponentBase
- Parameters:
component
- base bean- See Also:
ComponentBase.copy()
Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.