Package com.sun.faces.ext.component
Class MessageFactory
- java.lang.Object
-
- com.sun.faces.ext.component.MessageFactory
-
public class MessageFactory extends Object
supported filters:
packageandprotection.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectgetLabel(FacesContext context, UIComponent component)Returns thelabelproperty from the specified component.static FacesMessagegetMessage(FacesContext context, String messageId, Object... params)Creates and returns a FacesMessage for the specified Locale.
-
-
-
Method Detail
-
getMessage
public static FacesMessage getMessage(FacesContext context, String messageId, Object... params)
Creates and returns a FacesMessage for the specified Locale.
- Parameters:
context- - theFacesContextfor the current requestmessageId- - the key of the message in the resource bundleparams- - substittion parameters- Returns:
- a localized
FacesMessagewith the severity of FacesMessage.SEVERITY_ERROR
-
getLabel
public static Object getLabel(FacesContext context, UIComponent component)
Returns the
labelproperty from the specified component.- Parameters:
context- - theFacesContextfor the current requestcomponent- - the component of interest- Returns:
- the label, if any, of the component
-
-