public class Message extends ContentElementBase
The Message
is used to display static text in the user interface
templateOptions
componentCode, namespaceCode
INITIAL_ORDER_VALUE
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing information on errors
found in the component.
|
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.
|
String |
getWrapperTag()
Defines the html tag that will wrap this message, if left blank, this will automatically be set by the framework
to the appropriate tag (in most cases p or div)
|
boolean |
isContainsBlockElements()
True if the message contains block elements, or when it contains an unknown tag that may be a block element.
|
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
Indicates whether the component should be rendered in the UI
|
boolean |
isRenderWrapperTag()
If true, render the wrapper element (p or div) around this message (default true).
|
boolean |
isRichMessage()
If this message is considered a rich message (is using some rich message functionality with by using
the special [] tags), returns true
|
void |
performApplyModel(Object model,
LifecycleElement parent)
Message perform apply model parses message text for rich text functionality if the messageText contains
[ or ] special characters
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 data
|
void |
performFinalize(Object model,
LifecycleElement 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
The last phase before the view is rendered
|
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
|
void |
setRenderWrapperTag(boolean renderWrapperTag)
Sets the generate wrapper element flag
|
void |
setWrapperTag(String wrapperTag) |
afterEvaluateExpression, getComponentTypeName
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, 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, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setAriaAttributes, 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, skipLifecycle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAriaAttribute, addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getAriaAttributes, getAriaAttributesAsString, 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, 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, setWrapperStyle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
checkMutable, getContainerIdSuffix, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, notifyCompleted, performInitialization, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setId, setPhasePathMapping, setRender, setViewPath, skipLifecycle
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, setOnUnloadScript
public Message()
public void performApplyModel(Object model, LifecycleElement parent)
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel
in interface LifecycleElement
performApplyModel
in class ComponentBase
model
- - Top level object containing the data (could be the form or a
top level business object, dto)parent
- parent lifecycle elementpublic void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
performFinalize
in class ComponentBase
model
- - top level object containing the dataparent
- - parent componentpublic boolean isRender()
If set to false, the corresponding component template will not be invoked (therefore nothing will be rendered to the UI).
isRender
in interface LifecycleElement
isRender
in class ComponentBase
public String getMessageText()
If special characters [] are detected the message is split at that location. The types of features supported by the parse are (note that <> are not part of the content, they specify placeholders):
In addition to these settings, you can also specify data to send to the server in this fashion (space is required between settings and data):
[action=<action settings> data={key1: 'value 1', key2: value2}]public void setMessageText(String messageText)
messageText
- public String getWrapperTag()
public void setWrapperTag(String wrapperTag)
getWrapperTag()
public boolean isRenderWrapperTag()
The wrapper will be either a p tag, for when the element only contains inline elements, or a div tag, for when the message might contain block level elements or undetermined html tags resulting from rich message functionality. When false, skips the wrapper generation for this message - this has the additional effect the css classes/style classes will be lost for this message.
public void setRenderWrapperTag(boolean renderWrapperTag)
renderWrapperTag
- public List<Component> getMessageComponentStructure()
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.
public void setMessageComponentStructure(List<Component> messageComponentStructure)
messageComponentStructure
- list of components which represent the message structure@ViewLifecycleRestriction(exclude={"APPLY_MODEL","FINALIZE"}) public List<Component> getInlineComponents()
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 doesn't exist), an error will be thrown during message parse.
public void setInlineComponents(List<Component> inlineComponents)
inlineComponents
- the inlineComponents to be filled in at indexes referenced by [n] in the messagepublic boolean isParseComponents()
public void setParseComponents(boolean parseComponents)
parseComponents
- public boolean isRichMessage()
public boolean isContainsBlockElements()
public void completeValidation(ValidationTrace tracer)
completeValidation
in interface Component
completeValidation
in class ComponentBase
tracer
- Record of component's locationCopyright © 2005–2014 The Kuali Foundation. All rights reserved.