com.sun.faces.util
Class MessageFactory.BindingFacesMessage

java.lang.Object
  extended by javax.faces.application.FacesMessage
      extended by com.sun.faces.util.MessageFactory.BindingFacesMessage
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
MessageFactory

static class MessageFactory.BindingFacesMessage
extends javax.faces.application.FacesMessage

This class overrides FacesMessage to provide the evaluation of binding expressions in addition to Strings. It is often the case, that a binding expression may reference a localized property value that would be used as a substitution parameter in the message. For example: #{bundle.userLabel} "bundle" may not be available until the page is rendered. The "late" binding evaluation in getSummary and getDetail allow the expression to be evaluated when that property is available.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.application.FacesMessage
javax.faces.application.FacesMessage.Severity
 
Field Summary
private  java.util.Locale locale
           
private  java.lang.Object[] parameters
           
private  java.lang.Object[] resolvedParameters
           
 
Fields inherited from class javax.faces.application.FacesMessage
FACES_MESSAGES, SEVERITY_ERROR, SEVERITY_FATAL, SEVERITY_INFO, SEVERITY_WARN, VALUES, VALUES_MAP
 
Constructor Summary
MessageFactory.BindingFacesMessage(java.util.Locale locale, java.lang.String messageFormat, java.lang.String detailMessageFormat, java.lang.Object[] parameters)
           
 
Method Summary
 java.lang.String getDetail()
           
private  java.lang.String getFormattedString(java.lang.String msgtext, java.lang.Object[] params)
           
 java.lang.String getSummary()
           
private  void resolveBindings()
           
 
Methods inherited from class javax.faces.application.FacesMessage
getSeverity, isRendered, rendered, setDetail, setSeverity, setSummary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locale

private java.util.Locale locale

parameters

private java.lang.Object[] parameters

resolvedParameters

private java.lang.Object[] resolvedParameters
Constructor Detail

MessageFactory.BindingFacesMessage

MessageFactory.BindingFacesMessage(java.util.Locale locale,
                                   java.lang.String messageFormat,
                                   java.lang.String detailMessageFormat,
                                   java.lang.Object[] parameters)
Method Detail

getSummary

public java.lang.String getSummary()
Overrides:
getSummary in class javax.faces.application.FacesMessage

getDetail

public java.lang.String getDetail()
Overrides:
getDetail in class javax.faces.application.FacesMessage

resolveBindings

private void resolveBindings()

getFormattedString

private java.lang.String getFormattedString(java.lang.String msgtext,
                                            java.lang.Object[] params)


Copyright 2002-2011 Oracle America, Inc. All Rights Reserved.