Class MessageFactory

java.lang.Object
com.sun.faces.ext.component.MessageFactory

public class MessageFactory extends Object

supported filters: package and protection.

  • Method Details

    • getMessage

      public static FacesMessage getMessage(FacesContext context, String messageId, Object... params)

      Creates and returns a FacesMessage for the specified Locale.

      Parameters:
      context - - the FacesContext for the current request
      messageId - - the key of the message in the resource bundle
      params - - substittion parameters
      Returns:
      a localized FacesMessage with the severity of FacesMessage.SEVERITY_ERROR
    • getLabel

      public static Object getLabel(FacesContext context, UIComponent component)

      Returns the label property from the specified component.

      Parameters:
      context - - the FacesContext for the current request
      component - - the component of interest
      Returns:
      the label, if any, of the component