org.apache.myfaces.trinidadinternal.ui.laf.base.desktop
Class MessageWrapper

java.lang.Object
  extended by javax.faces.application.FacesMessage
      extended by org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.MessageWrapper
All Implemented Interfaces:
java.io.Serializable

public class MessageWrapper
extends javax.faces.application.FacesMessage

A thin wrapper around a . This wrapper offers up the message along with the ID of the component, and a generic text.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/base/desktop/MessageWrapper.java#0 $) $Date: 10-nov-2005.18:55:27 $
Author:
The Oracle ADF Faces Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.application.FacesMessage
javax.faces.application.FacesMessage.Severity
 
Field Summary
 
Fields inherited from class javax.faces.application.FacesMessage
FACES_MESSAGES, SEVERITY_ERROR, SEVERITY_FATAL, SEVERITY_INFO, SEVERITY_WARN, VALUES, VALUES_MAP
 
Constructor Summary
MessageWrapper(javax.faces.application.FacesMessage message, java.lang.String id)
          Creates a wrapper
 
Method Summary
 java.lang.Object getId()
          Returns the ID of the component that queued this message.
 java.lang.String getLabel()
          Returns the label of the component if it was saved with the message.
 java.lang.String getLabel(java.lang.String dflt)
          Returns the label of the component if it was saved with the message.
 java.lang.String getText()
          Returns a text string suitable for a description field.
 boolean hasLabel()
          Returns true if there is a label attached to this message
 
Methods inherited from class javax.faces.application.FacesMessage
getDetail, getSeverity, getSummary, setDetail, setSeverity, setSummary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageWrapper

public MessageWrapper(javax.faces.application.FacesMessage message,
                      java.lang.String id)
Creates a wrapper

Parameters:
message - The base .
id - The ID of the component for which this message was queued.
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label of the component if it was saved with the message.


getLabel

public java.lang.String getLabel(java.lang.String dflt)
Returns the label of the component if it was saved with the message.

Parameters:
dflt - A default string to return of no label is found

hasLabel

public boolean hasLabel()
Returns true if there is a label attached to this message


getId

public java.lang.Object getId()
Returns the ID of the component that queued this message. Will return null for global messages.


getText

public java.lang.String getText()
Returns a text string suitable for a description field.



Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.