org.rcfaces.core.component
Class MessageComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIMessage
              extended by org.rcfaces.core.internal.component.CameliaMessageComponent
                  extended by org.rcfaces.core.component.AbstractMessageComponent
                      extended by org.rcfaces.core.component.MessageComponent
All Implemented Interfaces:
StateHolder, IClientDataCapability, IErrorEventCapability, IForCapability, IForegroundBackgroundColorCapability, IHeightCapability, IHelpCapability, IHiddenModeCapability, IImageCapability, IImageSizeCapability, IInitEventCapability, ILayoutPositionCapability, ILookAndFeelCapability, IMarginCapability, IMouseEventCapability, IPartialRenderingCapability, IPositionCapability, IPropertyChangeEventCapability, IServerDataCapability, ISeverityImagesCapability, ISeverityStyleClassCapability, ISizeCapability, IStyleClassCapability, ITextCapability, IToolTipCapability, IUnlockedClientAttributesCapability, IUserEventCapability, IVisibilityCapability, IWAIRoleCapability, IWidthCapability, org.rcfaces.core.internal.capability.IComponentLifeCycle, org.rcfaces.core.internal.capability.IImageAccessorsCapability, org.rcfaces.core.internal.capability.IRCFacesComponent, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IContainerManager, org.rcfaces.core.internal.manager.IServerDataManager, org.rcfaces.core.internal.manager.ITransientAttributesManager

public class MessageComponent
extends AbstractMessageComponent
implements IImageSizeCapability, ITextCapability, ISeverityStyleClassCapability, ISeverityImagesCapability, org.rcfaces.core.internal.capability.IImageAccessorsCapability

The message Component is a placeholder for error messages (only one is shown).

The message Component has the following capabilities :

The default message renderer is linked to the f_message javascript class. f_message extends f_component, fa_message1

Table of component style classes:

Style Name Description
f_message Defines styles for the wrapper DIV element
f_message_summary Defines styles for the summary error message
f_message_detail Defines styles for the detail error message


Field Summary
protected static Set CAMELIA_ATTRIBUTES
           
static String COMPONENT_TYPE
           
 
Fields inherited from class org.rcfaces.core.internal.component.CameliaMessageComponent
engine
 
Fields inherited from class javax.faces.component.UIMessage
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Fields inherited from interface org.rcfaces.core.component.capability.IHiddenModeCapability
CLIENT_HIDDEN_MODE, DEFAULT_HIDDEN_MODE, IGNORE_HIDDEN_MODE, PHANTOM_HIDDEN_MODE, SERVER_HIDDEN_MODE
 
Constructor Summary
MessageComponent()
           
MessageComponent(String componentId)
           
 
Method Summary
protected  Set getCameliaFields()
           
 String getErrorImageURL()
          Returns an url string pointing to the image used for an error message.
 String getErrorImageURL(FacesContext facesContext)
          See getErrorImageURL() for more details
 String getErrorStyleClass()
          Returns a space-separated list of CSS style class(es) to be applied for error messages.
 String getErrorStyleClass(FacesContext facesContext)
          See getErrorStyleClass() for more details
 String getFatalImageURL()
          Returns an url string pointing to the image used for an fatal message.
 String getFatalImageURL(FacesContext facesContext)
          See getFatalImageURL() for more details
 String getFatalStyleClass()
          Returns a space-separated list of CSS style class(es) to be applied for fatal messages.
 String getFatalStyleClass(FacesContext facesContext)
          See getFatalStyleClass() for more details
 IContentAccessors getImageAccessors()
          Returns ImageAccessors associated to the url.
 IContentAccessors getImageAccessors(FacesContext facesContext)
           
 int getImageHeight()
          Returns an int value specifying the height (in pixels) to use for the image shown.
 int getImageHeight(FacesContext facesContext)
          See getImageHeight() for more details
 String getImageURL()
          Returns the URL of the image.
 String getImageURL(FacesContext facesContext)
          See getImageURL() for more details
 int getImageWidth()
          Returns an int value specifying the width (in pixels) to use for the image shown.
 int getImageWidth(FacesContext facesContext)
          See getImageWidth() for more details
 String getInfoImageURL()
          Returns an url string pointing to the image used for an info message.
 String getInfoImageURL(FacesContext facesContext)
          See getInfoImageURL() for more details
 String getInfoStyleClass()
          Returns a space-separated list of CSS style class(es) to be applied for info messages.
 String getInfoStyleClass(FacesContext facesContext)
          See getInfoStyleClass() for more details
 String getText()
          Returns a string value specifying the text shown.
 String getText(FacesContext facesContext)
          See getText() for more details
 String getWarnImageURL()
          Returns an url string pointing to the image used for an warning message.
 String getWarnImageURL(FacesContext facesContext)
          See getWarnImageURL() for more details
 String getWarnStyleClass()
          Returns a space-separated list of CSS style class(es) to be applied for warning messages.
 String getWarnStyleClass(FacesContext facesContext)
          See getWarnStyleClass() for more details
 boolean isErrorImageURLSetted()
          Returns true if the attribute "errorImageURL" is set.
 boolean isErrorStyleClassSetted()
          Returns true if the attribute "errorStyleClass" is set.
 boolean isFatalImageURLSetted()
          Returns true if the attribute "fatalImageURL" is set.
 boolean isFatalStyleClassSetted()
          Returns true if the attribute "fatalStyleClass" is set.
 boolean isImageHeightSetted()
          Returns true if the attribute "imageHeight" is set.
 boolean isImageURLSetted()
          Returns true if the attribute "imageURL" is set.
 boolean isImageWidthSetted()
          Returns true if the attribute "imageWidth" is set.
 boolean isInfoImageURLSetted()
          Returns true if the attribute "infoImageURL" is set.
 boolean isInfoStyleClassSetted()
          Returns true if the attribute "infoStyleClass" is set.
 boolean isShowActiveComponentMessage()
           
 boolean isShowActiveComponentMessage(FacesContext facesContext)
           
 boolean isShowActiveComponentMessageSetted()
          Returns true if the attribute "showActiveComponentMessage" is set.
 boolean isShowIfMessage()
           
 boolean isShowIfMessage(FacesContext facesContext)
           
 boolean isShowIfMessageSetted()
          Returns true if the attribute "showIfMessage" is set.
 boolean isTextSetted()
          Returns true if the attribute "text" is set.
 boolean isWarnImageURLSetted()
          Returns true if the attribute "warnImageURL" is set.
 boolean isWarnStyleClassSetted()
          Returns true if the attribute "warnStyleClass" is set.
 void setErrorImageURL(String errorImageURL)
          Sets an url string pointing to the image used for an error message.
 void setErrorStyleClass(String errorStyleClass)
          Sets a space-separated list of CSS style class(es) to be applied for error messages.
 void setFatalImageURL(String fatalImageURL)
          Sets an url string pointing to the image used for an fatal message.
 void setFatalStyleClass(String fatalStyleClass)
          Sets a space-separated list of CSS style class(es) to be applied for fatal messages.
 void setImageHeight(int imageHeight)
          Sets an int value specifying the height (in pixels) to use for the image shown.
 void setImageURL(String imageURL)
          Specify the URL of the image.
 void setImageWidth(int imageWidth)
          Sets an int value specifying the width (in pixels) to use for the image shown.
 void setInfoImageURL(String infoImageURL)
          Sets an url string pointing to the image used for an info message.
 void setInfoStyleClass(String infoStyleClass)
          Sets a space-separated list of CSS style class(es) to be applied for info messages.
 void setShowActiveComponentMessage(boolean showActiveComponentMessage)
           
 void setShowIfMessage(boolean showIfMessage)
           
 void setText(String text)
          Sets a string value specifying the text to be shown.
 void setWarnImageURL(String warnImageURL)
          Sets an url string pointing to the image used for an warning message.
 void setWarnStyleClass(String warnStyleClass)
          Sets a space-separated list of CSS style class(es) to be applied for warning messages.
 
Methods inherited from class org.rcfaces.core.component.AbstractMessageComponent
addErrorListener, addInitListener, addMouseOutListener, addMouseOverListener, addPropertyChangeListener, addUserEventListener, getAriaLabel, getAriaLabel, getAriaLevel, getAriaLevel, getBackgroundColor, getBackgroundColor, getBottom, getBottom, getClientData, getClientData, getClientDataCount, getClientDataMap, getClientDataMap, getForegroundColor, getForegroundColor, getHeight, getHeight, getHelpMessage, getHelpMessage, getHelpURL, getHelpURL, getHiddenMode, getHiddenMode, getLeft, getLeft, getLookId, getLookId, getMarginBottom, getMarginBottom, getMarginLeft, getMarginLeft, getMarginRight, getMarginRight, getMarginTop, getMarginTop, getRight, getRight, getServerData, getServerData, getServerDataCount, getServerDataMap, getServerDataMap, getStyleClass, getStyleClass, getToolTipText, getToolTipText, getTop, getTop, getUnlockedClientAttributeNames, getUnlockedClientAttributeNames, getVisibleState, getVisibleState, getWaiRole, getWaiRole, getWidth, getWidth, getX, getX, getY, getY, isAriaLabelSetted, isAriaLevelSetted, isBackgroundColorSetted, isBottomSetted, isForegroundColorSetted, isHeightSetted, isHelpMessageSetted, isHelpURLSetted, isHiddenModeSetted, isLeftSetted, isLookIdSetted, isMarginBottomSetted, isMarginLeftSetted, isMarginRightSetted, isMarginTopSetted, isPartialRendering, isPartialRendering, isPartialRenderingSetted, isRightSetted, isStyleClassSetted, isToolTipTextSetted, isTopSetted, isUnlockedClientAttributeNamesSetted, isVisible, isVisible, isVisibleSetted, isWaiRoleSetted, isWidthSetted, isXSetted, isYSetted, listClientDataKeys, listClientDataKeys, listErrorListeners, listInitListeners, listMouseOutListeners, listMouseOverListeners, listPropertyChangeListeners, listServerDataKeys, listServerDataKeys, listUserEventListeners, removeClientData, removeErrorListener, removeInitListener, removeMouseOutListener, removeMouseOverListener, removePropertyChangeListener, removeServerData, removeUserEventListener, setAriaLabel, setAriaLevel, setBackgroundColor, setBottom, setClientData, setClientData, setForegroundColor, setHeight, setHelpMessage, setHelpURL, setHiddenMode, setHiddenMode, setLeft, setLookId, setMarginBottom, setMarginLeft, setMarginRight, setMargins, setMarginTop, setPartialRendering, setRight, setServerData, setServerData, setStyleClass, setToolTipText, setTop, setUnlockedClientAttributeNames, setVisible, setWaiRole, setWidth, setX, setY
 
Methods inherited from class org.rcfaces.core.internal.component.CameliaMessageComponent
clearListeners, confirmListenerAppend, constructPhase, constructTemplate, decodePhase, encodeBegin, encodeChildren, encodeEnd, getAsyncRenderer, getCameliaValueAlias, getChildren, getChildrenListState, getFamily, getRendererType, getTransientAttribute, getValueExpression, hasDefaultProperties, initializeComponent, initializePhase, isClientRendered, isRendered, isTemplateComponent, processDecodes, processEngineUpdates, processEngineValidators, processUpdates, processValidators, queueEvent, renderPhase, restoreState, saveState, setDefaultProperties, setRendered, setTransientAttribute, setValueExpression, toString, updatePhase, validationPhase, verifyAsyncDecode
 
Methods inherited from class javax.faces.component.UIMessage
getFor, isShowDetail, isShowSummary, setFor, setShowDetail, setShowSummary
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rcfaces.core.component.capability.IStyleClassCapability
getStyleClass, setStyleClass
 
Methods inherited from interface org.rcfaces.core.component.capability.IForCapability
getFor, setFor
 
Methods inherited from interface org.rcfaces.core.internal.manager.IContainerManager
getChildCount
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

CAMELIA_ATTRIBUTES

protected static final Set CAMELIA_ATTRIBUTES
Constructor Detail

MessageComponent

public MessageComponent()

MessageComponent

public MessageComponent(String componentId)
Method Detail

getImageAccessors

public IContentAccessors getImageAccessors(FacesContext facesContext)
Specified by:
getImageAccessors in interface org.rcfaces.core.internal.capability.IImageAccessorsCapability

getImageHeight

public int getImageHeight()
Description copied from interface: IImageSizeCapability
Returns an int value specifying the height (in pixels) to use for the image shown.

Specified by:
getImageHeight in interface IImageSizeCapability
Returns:
image height in pixels

getImageHeight

public int getImageHeight(FacesContext facesContext)
See getImageHeight() for more details


isImageHeightSetted

public final boolean isImageHeightSetted()
Returns true if the attribute "imageHeight" is set.

Returns:
true if the attribute is set.

setImageHeight

public void setImageHeight(int imageHeight)
Description copied from interface: IImageSizeCapability
Sets an int value specifying the height (in pixels) to use for the image shown.

Specified by:
setImageHeight in interface IImageSizeCapability
Parameters:
imageHeight - image height in pixels

getImageWidth

public int getImageWidth()
Description copied from interface: IImageSizeCapability
Returns an int value specifying the width (in pixels) to use for the image shown.

Specified by:
getImageWidth in interface IImageSizeCapability
Returns:
image width in pixels

getImageWidth

public int getImageWidth(FacesContext facesContext)
See getImageWidth() for more details


isImageWidthSetted

public final boolean isImageWidthSetted()
Returns true if the attribute "imageWidth" is set.

Returns:
true if the attribute is set.

setImageWidth

public void setImageWidth(int imageWidth)
Description copied from interface: IImageSizeCapability
Sets an int value specifying the width (in pixels) to use for the image shown.

Specified by:
setImageWidth in interface IImageSizeCapability
Parameters:
imageWidth - image width in pixels

getText

public String getText()
Description copied from interface: ITextCapability
Returns a string value specifying the text shown.

Specified by:
getText in interface ITextCapability
Returns:
text

getText

public String getText(FacesContext facesContext)
See getText() for more details


isTextSetted

public final boolean isTextSetted()
Returns true if the attribute "text" is set.

Returns:
true if the attribute is set.

setText

public void setText(String text)
Description copied from interface: ITextCapability
Sets a string value specifying the text to be shown.

Specified by:
setText in interface ITextCapability
Parameters:
text - text

getErrorStyleClass

public String getErrorStyleClass()
Description copied from interface: ISeverityStyleClassCapability
Returns a space-separated list of CSS style class(es) to be applied for error messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
getErrorStyleClass in interface ISeverityStyleClassCapability
Returns:
list of CSS style classes

getErrorStyleClass

public String getErrorStyleClass(FacesContext facesContext)
See getErrorStyleClass() for more details


isErrorStyleClassSetted

public final boolean isErrorStyleClassSetted()
Returns true if the attribute "errorStyleClass" is set.

Returns:
true if the attribute is set.

setErrorStyleClass

public void setErrorStyleClass(String errorStyleClass)
Description copied from interface: ISeverityStyleClassCapability
Sets a space-separated list of CSS style class(es) to be applied for error messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
setErrorStyleClass in interface ISeverityStyleClassCapability
Parameters:
errorStyleClass - list of CSS style classes

getFatalStyleClass

public String getFatalStyleClass()
Description copied from interface: ISeverityStyleClassCapability
Returns a space-separated list of CSS style class(es) to be applied for fatal messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
getFatalStyleClass in interface ISeverityStyleClassCapability
Returns:
list of CSS style classes

getFatalStyleClass

public String getFatalStyleClass(FacesContext facesContext)
See getFatalStyleClass() for more details


isFatalStyleClassSetted

public final boolean isFatalStyleClassSetted()
Returns true if the attribute "fatalStyleClass" is set.

Returns:
true if the attribute is set.

setFatalStyleClass

public void setFatalStyleClass(String fatalStyleClass)
Description copied from interface: ISeverityStyleClassCapability
Sets a space-separated list of CSS style class(es) to be applied for fatal messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
setFatalStyleClass in interface ISeverityStyleClassCapability
Parameters:
fatalStyleClass - list of CSS style classes

getInfoStyleClass

public String getInfoStyleClass()
Description copied from interface: ISeverityStyleClassCapability
Returns a space-separated list of CSS style class(es) to be applied for info messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
getInfoStyleClass in interface ISeverityStyleClassCapability
Returns:
list of CSS style classes

getInfoStyleClass

public String getInfoStyleClass(FacesContext facesContext)
See getInfoStyleClass() for more details


isInfoStyleClassSetted

public final boolean isInfoStyleClassSetted()
Returns true if the attribute "infoStyleClass" is set.

Returns:
true if the attribute is set.

setInfoStyleClass

public void setInfoStyleClass(String infoStyleClass)
Description copied from interface: ISeverityStyleClassCapability
Sets a space-separated list of CSS style class(es) to be applied for info messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
setInfoStyleClass in interface ISeverityStyleClassCapability
Parameters:
infoStyleClass - list of CSS style classes

getWarnStyleClass

public String getWarnStyleClass()
Description copied from interface: ISeverityStyleClassCapability
Returns a space-separated list of CSS style class(es) to be applied for warning messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
getWarnStyleClass in interface ISeverityStyleClassCapability
Returns:
list of CSS style classes

getWarnStyleClass

public String getWarnStyleClass(FacesContext facesContext)
See getWarnStyleClass() for more details


isWarnStyleClassSetted

public final boolean isWarnStyleClassSetted()
Returns true if the attribute "warnStyleClass" is set.

Returns:
true if the attribute is set.

setWarnStyleClass

public void setWarnStyleClass(String warnStyleClass)
Description copied from interface: ISeverityStyleClassCapability
Sets a space-separated list of CSS style class(es) to be applied for warning messages. This value will be passed through as the "class" attribute on generated markup.

Specified by:
setWarnStyleClass in interface ISeverityStyleClassCapability
Parameters:
warnStyleClass - list of CSS style classes

getErrorImageURL

public String getErrorImageURL()
Description copied from interface: ISeverityImagesCapability
Returns an url string pointing to the image used for an error message.

Specified by:
getErrorImageURL in interface ISeverityImagesCapability
Returns:
url

getErrorImageURL

public String getErrorImageURL(FacesContext facesContext)
See getErrorImageURL() for more details


isErrorImageURLSetted

public final boolean isErrorImageURLSetted()
Returns true if the attribute "errorImageURL" is set.

Returns:
true if the attribute is set.

setErrorImageURL

public void setErrorImageURL(String errorImageURL)
Description copied from interface: ISeverityImagesCapability
Sets an url string pointing to the image used for an error message.

Specified by:
setErrorImageURL in interface ISeverityImagesCapability
Parameters:
errorImageURL - url

getFatalImageURL

public String getFatalImageURL()
Description copied from interface: ISeverityImagesCapability
Returns an url string pointing to the image used for an fatal message.

Specified by:
getFatalImageURL in interface ISeverityImagesCapability
Returns:
url

getFatalImageURL

public String getFatalImageURL(FacesContext facesContext)
See getFatalImageURL() for more details


isFatalImageURLSetted

public final boolean isFatalImageURLSetted()
Returns true if the attribute "fatalImageURL" is set.

Returns:
true if the attribute is set.

setFatalImageURL

public void setFatalImageURL(String fatalImageURL)
Description copied from interface: ISeverityImagesCapability
Sets an url string pointing to the image used for an fatal message.

Specified by:
setFatalImageURL in interface ISeverityImagesCapability
Parameters:
fatalImageURL - url

getInfoImageURL

public String getInfoImageURL()
Description copied from interface: ISeverityImagesCapability
Returns an url string pointing to the image used for an info message.

Specified by:
getInfoImageURL in interface ISeverityImagesCapability
Returns:
url

getInfoImageURL

public String getInfoImageURL(FacesContext facesContext)
See getInfoImageURL() for more details


isInfoImageURLSetted

public final boolean isInfoImageURLSetted()
Returns true if the attribute "infoImageURL" is set.

Returns:
true if the attribute is set.

setInfoImageURL

public void setInfoImageURL(String infoImageURL)
Description copied from interface: ISeverityImagesCapability
Sets an url string pointing to the image used for an info message.

Specified by:
setInfoImageURL in interface ISeverityImagesCapability
Parameters:
infoImageURL - url

getWarnImageURL

public String getWarnImageURL()
Description copied from interface: ISeverityImagesCapability
Returns an url string pointing to the image used for an warning message.

Specified by:
getWarnImageURL in interface ISeverityImagesCapability
Returns:
url

getWarnImageURL

public String getWarnImageURL(FacesContext facesContext)
See getWarnImageURL() for more details


isWarnImageURLSetted

public final boolean isWarnImageURLSetted()
Returns true if the attribute "warnImageURL" is set.

Returns:
true if the attribute is set.

setWarnImageURL

public void setWarnImageURL(String warnImageURL)
Description copied from interface: ISeverityImagesCapability
Sets an url string pointing to the image used for an warning message.

Specified by:
setWarnImageURL in interface ISeverityImagesCapability
Parameters:
warnImageURL - url

getImageURL

public String getImageURL()
Description copied from interface: IImageCapability
Returns the URL of the image.

Specified by:
getImageURL in interface IImageCapability

getImageURL

public String getImageURL(FacesContext facesContext)
See getImageURL() for more details


isImageURLSetted

public final boolean isImageURLSetted()
Returns true if the attribute "imageURL" is set.

Returns:
true if the attribute is set.

setImageURL

public void setImageURL(String imageURL)
Description copied from interface: IImageCapability
Specify the URL of the image.

Specified by:
setImageURL in interface IImageCapability

getImageAccessors

public IContentAccessors getImageAccessors()
Description copied from interface: IImageCapability
Returns ImageAccessors associated to the url. (or java.awt.Image binding)

Specified by:
getImageAccessors in interface IImageCapability
Returns:
IImageAccessors object.

isShowIfMessage

public boolean isShowIfMessage()

isShowIfMessage

public boolean isShowIfMessage(FacesContext facesContext)

setShowIfMessage

public void setShowIfMessage(boolean showIfMessage)

isShowIfMessageSetted

public boolean isShowIfMessageSetted()
Returns true if the attribute "showIfMessage" is set.

Returns:
true if the attribute is set.

isShowActiveComponentMessage

public boolean isShowActiveComponentMessage()

isShowActiveComponentMessage

public boolean isShowActiveComponentMessage(FacesContext facesContext)

setShowActiveComponentMessage

public void setShowActiveComponentMessage(boolean showActiveComponentMessage)

isShowActiveComponentMessageSetted

public boolean isShowActiveComponentMessageSetted()
Returns true if the attribute "showActiveComponentMessage" is set.

Returns:
true if the attribute is set.

getCameliaFields

protected Set getCameliaFields()
Overrides:
getCameliaFields in class AbstractMessageComponent


Copyright © 2006-2011 Vedana. All Rights Reserved.