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

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.Message
All Implemented Interfaces:
Serializable, 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

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
Message()
           
 
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()
          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.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, 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, 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

Message

public Message()
Method Detail

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 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)
Description copied from class: ComponentBase
The following finalization is done here:

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

If the [] characters are needed in message text, they need to be declared with an escape character: \\[ \\]

Returns:
String 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 -


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