站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.2.1 API 英文版文档

FacesMessages (JBoss Seam API Documentation) - JBoss Seam 1.2.1 API 英文版文档


org.jboss.seam.core
Class FacesMessages

java.lang.Object
  extended by org.jboss.seam.core.FacesMessages
All Implemented Interfaces:
Serializable

@Scope(value=CONVERSATION)
@Name(value="org.jboss.seam.core.facesMessages")
@Install(precedence=0)
@Intercept(value=NEVER)
public class FacesMessages
extends Object
implements Serializable

A Seam component that TBD.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
FacesMessages()
           
 
Method Summary
 void add(javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)
          Add a templated FacesMessage that will be used the next time a page is rendered.
 void add(javax.faces.application.FacesMessage facesMessage)
          Add a FacesMessage that will be used the next time a page is rendered.
 void add(org.hibernate.validator.InvalidValue iv)
           
 void add(org.hibernate.validator.InvalidValue[] ivs)
           
 void add(String messageTemplate, Object... params)
          Add a templated FacesMessage that will be used the next time a page is rendered.
 void addFromResourceBundle(javax.faces.application.FacesMessage.Severity severity, String key, Object... params)
          Add a templated FacesMessage by looking for the message template in the resource bundle.
 void addFromResourceBundle(String key, Object... params)
          Add a templated FacesMessage by looking for the message template in the resource bundle.
 void addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
          Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.
 void addFromResourceBundleOrDefault(String key, String defaultMessageTemplate, Object... params)
          Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.
 void addToControl(org.hibernate.validator.InvalidValue iv)
           
 void addToControl(String id, javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)
          Add a templated FacesMessage to a particular JSF control
 void addToControl(String id, javax.faces.application.FacesMessage facesMessage)
          Add a FacesMessage instance to a particular component id
 void addToControl(String id, org.hibernate.validator.InvalidValue iv)
           
 void addToControl(String id, String messageTemplate, Object... params)
          Add a templated FacesMessage to a particular JSF control
 void addToControlFromResourceBundle(String id, javax.faces.application.FacesMessage.Severity severity, String key, Object... params)
          Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.
 void addToControlFromResourceBundle(String id, String key, Object... params)
          Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.
 void addToControlFromResourceBundleOrDefault(String id, javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
          Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.
 void addToControlFromResourceBundleOrDefault(String id, String key, String defaultMessageTemplate, Object... params)
          Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.
 void addToControls(org.hibernate.validator.InvalidValue[] ivs)
           
static void afterPhase()
           
 void beforeRenderResponse()
           
 void clear()
           
static javax.faces.application.FacesMessage createFacesMessage(javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)
           
static javax.faces.application.FacesMessage createFacesMessage(javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)
           
 List<javax.faces.application.FacesMessage> getCurrentGlobalMessages()
          Get all faces global messages that have already been added to the context.
 List<javax.faces.application.FacesMessage> getCurrentMessages()
          Get all faces messages that have already been added to the context.
static FacesMessages instance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesMessages

public FacesMessages()
Method Detail

beforeRenderResponse

public void beforeRenderResponse()

getCurrentMessages

public List<javax.faces.application.FacesMessage> getCurrentMessages()
Get all faces messages that have already been added to the context.

Returns:
a list of messages

getCurrentGlobalMessages

public List<javax.faces.application.FacesMessage> getCurrentGlobalMessages()
Get all faces global messages that have already been added to the context.

Returns:
a list of global messages

afterPhase

public static void afterPhase()

clear

public void clear()

add

public void add(javax.faces.application.FacesMessage facesMessage)
Add a FacesMessage that will be used the next time a page is rendered.


addToControl

public void addToControl(String id,
                         javax.faces.application.FacesMessage facesMessage)
Add a FacesMessage instance to a particular component id

Parameters:
id - a JSF component id

add

public void add(String messageTemplate,
                Object... params)
Add a templated FacesMessage that will be used the next time a page is rendered.


add

public void add(javax.faces.application.FacesMessage.Severity severity,
                String messageTemplate,
                Object... params)
Add a templated FacesMessage that will be used the next time a page is rendered.


addToControl

public void addToControl(String id,
                         String messageTemplate,
                         Object... params)
Add a templated FacesMessage to a particular JSF control

Parameters:
id - a JSF component id

addToControl

public void addToControl(String id,
                         javax.faces.application.FacesMessage.Severity severity,
                         String messageTemplate,
                         Object... params)
Add a templated FacesMessage to a particular JSF control

Parameters:
id - a JSF component id

addFromResourceBundle

public void addFromResourceBundle(String key,
                                  Object... params)
Add a templated FacesMessage by looking for the message template in the resource bundle.


addFromResourceBundle

public void addFromResourceBundle(javax.faces.application.FacesMessage.Severity severity,
                                  String key,
                                  Object... params)
Add a templated FacesMessage by looking for the message template in the resource bundle.


addFromResourceBundleOrDefault

public void addFromResourceBundleOrDefault(String key,
                                           String defaultMessageTemplate,
                                           Object... params)
Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle. If it is missing, use the given message template.


addFromResourceBundleOrDefault

public void addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity severity,
                                           String key,
                                           String defaultMessageTemplate,
                                           Object... params)
Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle. If it is missing, use the given message template.


addToControlFromResourceBundle

public void addToControlFromResourceBundle(String id,
                                           String key,
                                           Object... params)
Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.


addToControlFromResourceBundle

public void addToControlFromResourceBundle(String id,
                                           javax.faces.application.FacesMessage.Severity severity,
                                           String key,
                                           Object... params)
Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle.


addToControlFromResourceBundleOrDefault

public void addToControlFromResourceBundleOrDefault(String id,
                                                    String key,
                                                    String defaultMessageTemplate,
                                                    Object... params)
Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle. If it is missing, use the given message template.


addToControlFromResourceBundleOrDefault

public void addToControlFromResourceBundleOrDefault(String id,
                                                    javax.faces.application.FacesMessage.Severity severity,
                                                    String key,
                                                    String defaultMessageTemplate,
                                                    Object... params)
Add a templated FacesMessage to a particular component id by looking for the message template in the resource bundle. If it is missing, use the given message template.


add

public void add(org.hibernate.validator.InvalidValue[] ivs)

addToControls

public void addToControls(org.hibernate.validator.InvalidValue[] ivs)

add

public void add(org.hibernate.validator.InvalidValue iv)

addToControl

public void addToControl(org.hibernate.validator.InvalidValue iv)

addToControl

public void addToControl(String id,
                         org.hibernate.validator.InvalidValue iv)

createFacesMessage

public static javax.faces.application.FacesMessage createFacesMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                      String messageTemplate,
                                                                      Object... params)

createFacesMessage

public static javax.faces.application.FacesMessage createFacesMessage(javax.faces.application.FacesMessage.Severity severity,
                                                                      String key,
                                                                      String defaultMessageTemplate,
                                                                      Object... params)

instance

public static FacesMessages instance()