Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.faces
Class FacesMessages

    java.lang.Object
      org.jboss.seam.international.StatusMessages
          org.jboss.seam.faces.FacesMessages

All Implemented Interfaces:
  Serializable

    @Scope(value=CONVERSATION)
    @Name(value="org.jboss.seam.international.statusMessages")
    @Install(precedence=0,
             classDependencies="javax.faces.context.FacesContext")
    @BypassInterceptors
    public class FacesMessages

extends StatusMessages

A Seam component that propagates FacesMessages across redirects and interpolates EL expressions in the message string.

Author:
  Gavin King, Pete Muir
See Also:
  Serialized Form

Field Summary

Fields inherited from class org.jboss.seam.international.StatusMessages
`COMPONENT_NAME`

Constructor Summary
`FacesMessages()`

Method Summary
`void` | `add(javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)` Deprecated.
`void` | `add(javax.faces.application.FacesMessage facesMessage)` Deprecated.
`void` | `addFromResourceBundle(javax.faces.application.FacesMessage.Severity severity, String key, Object... params)` Deprecated.
`void` | `addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)` Deprecated.
`void` | `addToControl(String id, javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)` Deprecated.
`void` | `addToControlFromResourceBundle(String id, javax.faces.application.FacesMessage.Severity severity, String key, Object... params)` Deprecated.
`void` | `addToControlFromResourceBundleOrDefault(String id, javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)` Deprecated.
`static void` | `afterPhase()` Called by Seam to transfer any messages added in the phase just processed to the FacesMessages component.
`void` | `beforeRenderResponse()` Called by Seam to transfer messages from FacesMessages to JSF
`static javax.faces.application.FacesMessage` | `createFacesMessage(javax.faces.application.FacesMessage.Severity severity, String messageTemplate, Object... params)` Utility method to create a FacesMessage from a Severity, messageTemplate and params.
`static javax.faces.application.FacesMessage` | `createFacesMessage(javax.faces.application.FacesMessage.Severity severity, String key, String defaultMessageTemplate, Object... params)` Utility method to create a FacesMessage from a Severity, key, defaultMessageTemplate and 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.
`List<javax.faces.application.FacesMessage>` | `getCurrentMessagesForControl(String id)` Get all faces messages that have already been added to the control.
`static FacesMessages` | `instance()`

Methods inherited from class org.jboss.seam.international.StatusMessages
`add, add, add, add, add, addFromResourceBundle, addFromResourceBundle, addFromResourceBundleOrDefault, addFromResourceBundleOrDefault, addToControl, addToControl, addToControl, addToControl, addToControl, addToControlFromResourceBundle, addToControlFromResourceBundle, addToControlFromResourceBundleOrDefault, addToControlFromResourceBundleOrDefault, addToControls, clear, clearGlobalMessages, clearKeyedMessages, doRunTasks, getKeyedMessages, getMessages, runTasks`

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

  Called by Seam to transfer messages from FacesMessages to JSF

### afterPhase

    public static void afterPhase()

  Called by Seam to transfer any messages added in the phase just processed to the FacesMessages component. A task runner is used to allow the messages access to outjected values.

### getCurrentMessages

    public List<javax.faces.application.FacesMessage> getCurrentMessages()

  Get all faces messages that have already been added to the context.

### getCurrentGlobalMessages

    public List<javax.faces.application.FacesMessage> getCurrentGlobalMessages()

  Get all faces global messages that have already been added to the context.

### getCurrentMessagesForControl

    public List<javax.faces.application.FacesMessage> getCurrentMessagesForControl(String id)

  Get all faces messages that have already been added to the control.

### createFacesMessage

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

  Utility method to create a FacesMessage from a Severity, messageTemplate and params. This method interpolates the parameters provided

### createFacesMessage

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

  Utility method to create a FacesMessage from a Severity, key, defaultMessageTemplate and params. This method interpolates the parameters provided

### add

    @Deprecated
    public void add(javax.faces.application.FacesMessage facesMessage)

  Deprecated.

  Add a FacesMessage that will be used the next time a page is rendered. Deprecated, use a method in `StatusMessages` instead

### add

    @Deprecated
    public void add(javax.faces.application.FacesMessage.Severity severity,
                               String messageTemplate,
                               Object... params)

  Deprecated.

  Create a new status message, with the messageTemplate is as the message. You can also specify the severity, and parameters to be interpolated Deprecated, use `StatusMessages.add(org.jboss.seam.international.StatusMessage.Severity, String, Object...)` instead

### addToControl

    @Deprecated
    public void addToControl(String id,
                                        javax.faces.application.FacesMessage.Severity severity,
                                        String messageTemplate,
                                        Object... params)

  Deprecated.

  Create a new status message, with the messageTemplate is as the message. A severity of INFO will be used, and you can specify paramters to be interpolated Deprecated, use `StatusMessages.addToControl(String, org.jboss.seam.international.StatusMessage.Severity, String, Object...)` instead

### addFromResourceBundle

    @Deprecated
    public void addFromResourceBundle(javax.faces.application.FacesMessage.Severity severity,
                                                 String key,
                                                 Object... params)

  Deprecated.

  Add a status message, looking up the message in the resource bundle using the provided key. You can also specify the severity, and parameters to be interpolated Deprecated, use `StatusMessages.addFromResourceBundle(org.jboss.seam.international.StatusMessage.Severity, String, Object...)` instead

### addFromResourceBundleOrDefault

    @Deprecated
    public void addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity severity,
                                                          String key,
                                                          String defaultMessageTemplate,
                                                          Object... params)

  Deprecated.

  Add a status message, looking up the message in the resource bundle using the provided key. You can also specify the severity, and parameters to be interpolated Deprecated, use `addFromResourceBundleOrDefault(javax.faces.application.FacesMessage.Severity, String, String, Object...)` instead

### addToControlFromResourceBundle

    @Deprecated
    public void addToControlFromResourceBundle(String id,
                                                          javax.faces.application.FacesMessage.Severity severity,
                                                          String key,
                                                          Object... params)

  Deprecated.

  Create a new status message, looking up the message in the resource bundle using the provided key. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. You can also specify the severity, and parameters to be interpolated Deprecated, use `StatusMessages.addToControlFromResourceBundle(String, org.jboss.seam.international.StatusMessage.Severity, String, Object...)` instead

### addToControlFromResourceBundleOrDefault

    @Deprecated
    public void addToControlFromResourceBundleOrDefault(String id,
                                                                   javax.faces.application.FacesMessage.Severity severity,
                                                                   String key,
                                                                   String defaultMessageTemplate,
                                                                   Object... params)

  Deprecated.

  Add a status message, looking up the message in the resource bundle using the provided key. If the message is found, it is used, otherwise, the defaultMessageTemplate will be used. The message will be added to the widget specified by the ID. The algorithm used determine which widget the id refers to is determined by the view layer implementation in use. You can also specify the severity, and parameters to be interpolated Deprecated, use `StatusMessages.addToControlFromResourceBundleOrDefault(String, org.jboss.seam.international.StatusMessage.Severity, String, String, Object...)` instead

### instance

    public static FacesMessages instance()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 Seam Framework. All Rights Reserved.