public class JSFBeanContext extends BeanContext implements Serializable
log, STATUS| Constructor and Description |
|---|
JSFBeanContext() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createMessage(String target,
String message,
Object severity,
Object... additionalParams)
Creates the specified message targeting the specified UI element with the specified severity (semantically left open) with the specified additional parameters.
|
<T> T |
findBean(String name,
Class<T> type)
Finds and retrieves the bean associated with the specified name if it is an instance of the specified type.
|
protected Object |
getErrorSeverity()
Lets subclasses specify the object denoting the error severity
|
<T> T |
getFromFlash(String name,
Class<T> type) |
protected Object |
getInfoSeverity()
Lets subclasses specify the object denoting the information severity
|
protected Locale |
getLocale()
Retrieves the current locale for the UI.
|
String |
getParameter(String key)
Retrieves the value of the parameter which name is given from the request.
|
static String |
getParameter(String key,
javax.faces.context.FacesContext facesContext) |
static Locale |
getRequestLocale() |
String |
getServerAddress()
Retrieves the IP address of the server on which the UI is running.
|
Map<String,Object> |
getSessionMap()
Retrieves the session map where "session" is a concept left up to implementations (for JSF, the session
corresponds quite logically to the HTTP session)
|
static Map<String,Object> |
getSessionMap(javax.faces.context.FacesContext facesContext) |
static void |
outputLocalizedMessage(String target,
String localizationKey,
Object severity,
String resourceName,
Object... params) |
static void |
outputMessage(String target,
String message,
Object severity,
Object... additionalParams) |
void |
putInFlash(String name,
Object value)
Puts the given value in a flash scope that survives across a single request to be retrieved later via the specified name.
|
checkObject, createErrorMessage, createErrorMessageFrom, createErrorMessageFrom, createInfoMessage, createInfoMessage, createLocalizedMessage, createTargetedErrorMessage, getFromSession, getLocalizedMessage, getLocalizedMessage, getMessageFromBundle, getResourceName, removeFromSession, replaceInSession, setResourceNamepublic String getParameter(String key)
BeanContextgetParameter in class BeanContextkey - name of the parameter which value we want to retrievepublic static String getParameter(String key, javax.faces.context.FacesContext facesContext)
public Map<String,Object> getSessionMap()
BeanContextgetSessionMap in class BeanContextpublic <T> T findBean(String name, Class<T> type)
BeanContextfindBean in class BeanContextT - the expected type of the beanname - the name of the bean to retrievetype - the expected type of the beanpublic void putInFlash(String name, Object value)
BeanContextnull value switches to a
"remove" semantics where the value (if any) associated with the specified name is removed from the scope.putInFlash in class BeanContextname - the name with which the value can be later retrievedvalue - the value to put in the scope. Using null removes any existing association between the specified name and value in the scope.public <T> T getFromFlash(String name, Class<T> type)
getFromFlash in class BeanContextpublic static Map<String,Object> getSessionMap(javax.faces.context.FacesContext facesContext)
protected void createMessage(String target, String message, Object severity, Object... additionalParams)
BeanContextcreateMessage in class BeanContexttarget - the identifier of the target UI elementmessage - the message to createdseverity - the severity of the messageadditionalParams - potentially null additional parameterspublic static void outputMessage(String target, String message, Object severity, Object... additionalParams)
public static void outputLocalizedMessage(String target, String localizationKey, Object severity, String resourceName, Object... params)
protected Object getErrorSeverity()
BeanContextgetErrorSeverity in class BeanContextprotected Object getInfoSeverity()
BeanContextgetInfoSeverity in class BeanContextprotected Locale getLocale()
BeanContextgetLocale in class BeanContextpublic String getServerAddress()
BeanContextgetServerAddress in class BeanContextpublic static Locale getRequestLocale()
Copyright © 2006-2014 GateIn. All Rights Reserved.