public class MessageFactory extends Object
supported filters: package
and protection
.
Modifier and Type | Method and Description |
---|---|
protected static Application |
getApplication() |
protected static ClassLoader |
getCurrentLoader(Class fallbackClass) |
static Object |
getLabel(FacesContext context,
UIComponent component)
Returns the
label property from the specified component. |
static FacesMessage |
getMessage(FacesContext context,
String messageId,
FacesMessage.Severity severity,
Object... params) |
static FacesMessage |
getMessage(FacesContext context,
String messageId,
Object... params)
Creates and returns a FacesMessage for the specified Locale.
|
static FacesMessage |
getMessage(Locale locale,
String messageId,
FacesMessage.Severity severity,
Object... params) |
static FacesMessage |
getMessage(Locale locale,
String messageId,
Object... params)
Creates and returns a FacesMessage for the specified Locale.
|
static FacesMessage |
getMessage(String messageId,
FacesMessage.Severity severity,
Object... params) |
static FacesMessage |
getMessage(String messageId,
Object... params)
This version of getMessage() is used for localizing implementation specific messages.
|
public static FacesMessage getMessage(String messageId, FacesMessage.Severity severity, Object... params)
severity
- set a custom severitygetMessage(String, Object...)
public static FacesMessage getMessage(Locale locale, String messageId, FacesMessage.Severity severity, Object... params)
severity
- set a custom severitygetMessage(Locale, String, Object...)
public static FacesMessage getMessage(FacesContext context, String messageId, FacesMessage.Severity severity, Object... params)
severity
- set a custom severitygetMessage(FacesContext, String, Object...)
public static FacesMessage getMessage(String messageId, Object... params)
This version of getMessage() is used for localizing implementation specific messages.
messageId
- - the key of the message in the resource bundleparams
- - substittion parametersFacesMessage
with the severity of
FacesMessage.SEVERITY_ERRORpublic static FacesMessage getMessage(Locale locale, String messageId, Object... params)
Creates and returns a FacesMessage for the specified Locale.
locale
- - the target Locale
messageId
- - the key of the message in the resource bundleparams
- - substittion parametersFacesMessage
with the severity of
FacesMessage.SEVERITY_ERRORpublic static FacesMessage getMessage(FacesContext context, String messageId, Object... params)
Creates and returns a FacesMessage for the specified Locale.
context
- - the FacesContext
for the current requestmessageId
- - the key of the message in the resource bundleparams
- - substittion parametersFacesMessage
with the severity of
FacesMessage.SEVERITY_ERRORpublic static Object getLabel(FacesContext context, UIComponent component)
Returns the label
property from the specified component.
context
- - the FacesContext
for the current requestcomponent
- - the component of interestprotected static Application getApplication()
protected static ClassLoader getCurrentLoader(Class fallbackClass)
Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.