|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.trinidad.util.MessageFactory
public final class MessageFactory
Factory class to return FacesMessage
objects.
Method Summary | |
---|---|
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
javax.faces.application.FacesMessage.Severity severity,
String messageId,
Object[] parameters)
Creates a FacesMessage containing formatted text. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
javax.faces.application.FacesMessage.Severity severity,
String messageId,
Object[] parameters,
javax.faces.component.UIComponent component)
Creates a FacesMessage containing formatted text. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId)
Creates a FacesMessage without any parameters, and a severity of SEVERITY_ERROR. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object parameter)
Creates a FacesMessage using a single parameter. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object[] parameters)
Creates a FacesMessage containing formatted text and a severity of SEVERITY_ERROR. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object[] parameters,
Object label)
Creates a FacesMessage containing formatted text and a severity of SEVERITY_ERROR. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object[] parameters,
javax.faces.component.UIComponent component)
Creates a FacesMessage containing formatted text and a severity of SEVERITY_ERROR. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object parameter,
Object label)
Creates a FacesMessage using a single parameter. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object customMessagePattern,
Object[] parameters)
Gets the translation summary and detail text from the message bundle. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object customMessagePattern,
Object[] parameters,
Object label)
Gets the translation summary and detail text from the message bundle. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
Object customMessagePattern,
Object[] parameters,
javax.faces.component.UIComponent component)
Gets the translation summary and detail text from the message bundle. |
static javax.faces.application.FacesMessage |
getMessage(javax.faces.context.FacesContext context,
String messageId,
javax.faces.component.UIComponent component)
Creates a FacesMessage without any parameters, and a severity of SEVERITY_ERROR. |
static javax.faces.application.FacesMessage |
getMessage(Throwable error)
Creates a FacesMessage for the given Throwable. |
static String |
getString(javax.faces.context.FacesContext context,
String messageId)
Returns the localized string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.faces.application.FacesMessage getMessage(Throwable error)
FacesMessage.SEVERITY_ERROR
error
- The root cause of this Exception will be used.public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object[] parameters)
context
- faces contextmessageId
- the bundle key for the translated stringparameters
- parameters to be substituted in the placeholders
of the translated string.
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object[] parameters, javax.faces.component.UIComponent component)
context
- faces contextmessageId
- the bundle key for the translated stringparameters
- parameters to be substituted in the placeholders
of the translated string.component
- The component generating the message
(allows label tracking)
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object[] parameters, Object label)
context
- faces contextmessageId
- the bundle key for the translated stringparameters
- parameters to be substituted in the placeholders
of the translated string.label
- The label of the component generating the message
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, javax.faces.application.FacesMessage.Severity severity, String messageId, Object[] parameters)
context
- faces contextseverity
- the message severitymessageId
- the bundle key for the translated stringparameters
- parameters to be substituted in the placeholders
of the translated string.
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, javax.faces.application.FacesMessage.Severity severity, String messageId, Object[] parameters, javax.faces.component.UIComponent component)
context
- faces contextseverity
- the message severitymessageId
- the bundle key for the translated stringparameters
- parameters to be substituted in the placeholders
of the translated string.component
- The component generating the message
(allows label tracking)
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId)
context
- faces contextmessageId
- the bundle key for the translated string
public static String getString(javax.faces.context.FacesContext context, String messageId)
context
- messageId
-
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, javax.faces.component.UIComponent component)
context
- faces contextmessageId
- the bundle key for the translated stringcomponent
- The component generating the message
(allows label tracking)
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object parameter, Object label)
context
- faces contextmessageId
- the bundle key for the translated stringparameter
- parameter to be substituted for "{0}"label
- the label of the creating component
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object parameter)
context
- faces contextmessageId
- the bundle key for the translated stringparameter
- parameter to be substituted for "{0}"
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object customMessagePattern, Object[] parameters)
Gets the translation summary and detail text from the message bundle.
If customMessagePattern
is set, then it is used as the
detail part of the faces message. The summary and detail string are
formatted based on the supplied parameters
. Returns a
FacesMessage using the formatted summary and detail message with
severity set to error.
context
- faces contextmessageId
- the bundle key for the translated stringcustomMessagePattern
- Custom error message. It can also contain
placeholders which will be formatted with the supplied parameters.
This customizes the detail part of the FacesMessage
.
If value is null. Then picksup translation summary and detail from
the bundle, which is then formatted and used in construction of faces
message.parameters
- parameters to be substituted in the placeholders
of the translated string.
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object customMessagePattern, Object[] parameters, javax.faces.component.UIComponent component)
Gets the translation summary and detail text from the message bundle.
If customMessagePattern
is set, then it is used as the
detail part of the faces message. The summary and detail string are
formatted based on the supplied parameters
. Returns a
FacesMessage using the formatted summary and detail message with
severity set to error.
context
- faces contextmessageId
- the bundle key for the translated stringcustomMessagePattern
- Custom error message. It can also contain
placeholders which will be formatted with the supplied parameters.
This customizes the detail part of the FacesMessage
.
If value is null. Then picksup translation summary and detail from
the bundle, which is then formatted and used in construction of faces
message.parameters
- parameters to be substituted in the placeholders
of the translated string.component
- The component generating the message
(allows label tracking)
public static javax.faces.application.FacesMessage getMessage(javax.faces.context.FacesContext context, String messageId, Object customMessagePattern, Object[] parameters, Object label)
Gets the translation summary and detail text from the message bundle.
If customMessagePattern
is set, then it is used as the
detail part of the faces message. The summary and detail string are
formatted based on the supplied parameters
. Returns a
FacesMessage using the formatted summary and detail message with
severity set to error.
context
- faces contextmessageId
- the bundle key for the translated stringcustomMessagePattern
- Custom error message. It can also contain
placeholders which will be formatted with the supplied parameters.
This customizes the detail part of the FacesMessage
.
If value is null. Then picksup translation summary and detail from
the bundle, which is then formatted and used in construction of faces
message.parameters
- parameters to be substituted in the placeholders
of the translated string.label
- the label of the creating component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |