|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.el.ELResolver org.springframework.web.jsf.el.WebApplicationContextFacesELResolver
public class WebApplicationContextFacesELResolver
Special JSF 1.2 ELResolver
that exposes the Spring
WebApplicationContext
instance under a variable named
"webApplicationContext".
In contrast to SpringBeanFacesELResolver
, this ELResolver variant
does not resolve JSF variable names as Spring bean names. It rather
exposes Spring's root WebApplicationContext itself under a special name,
and is able to resolve "webApplicationContext.mySpringManagedBusinessObject"
dereferences to Spring-defined beans in that application context.
Configure this resolver in your faces-config.xml
file as follows:
<application> ... <el-resolver>org.springframework.web.jsf.el.WebApplicationContextFacesELResolver</el-resolver> </application>
SpringBeanFacesELResolver
,
FacesContextUtils.getWebApplicationContext(javax.faces.context.FacesContext)
Field Summary | |
---|---|
protected Log |
logger
Logger available to subclasses |
static String |
WEB_APPLICATION_CONTEXT_VARIABLE_NAME
Name of the exposed WebApplicationContext variable: "webApplicationContext". |
Fields inherited from class javax.el.ELResolver |
---|
RESOLVABLE_AT_DESIGN_TIME, TYPE |
Constructor Summary | |
---|---|
WebApplicationContextFacesELResolver()
|
Method Summary | |
---|---|
Class<?> |
getCommonPropertyType(javax.el.ELContext elContext,
Object base)
|
Iterator<FeatureDescriptor> |
getFeatureDescriptors(javax.el.ELContext elContext,
Object base)
|
Class<?> |
getType(javax.el.ELContext elContext,
Object base,
Object property)
|
Object |
getValue(javax.el.ELContext elContext,
Object base,
Object property)
|
protected WebApplicationContext |
getWebApplicationContext(javax.el.ELContext elContext)
Retrieve the WebApplicationContext reference to expose. |
boolean |
isReadOnly(javax.el.ELContext elContext,
Object base,
Object property)
|
void |
setValue(javax.el.ELContext elContext,
Object base,
Object property,
Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String WEB_APPLICATION_CONTEXT_VARIABLE_NAME
protected final Log logger
Constructor Detail |
---|
public WebApplicationContextFacesELResolver()
Method Detail |
---|
public Object getValue(javax.el.ELContext elContext, Object base, Object property) throws javax.el.ELException
getValue
in class javax.el.ELResolver
javax.el.ELException
public Class<?> getType(javax.el.ELContext elContext, Object base, Object property) throws javax.el.ELException
getType
in class javax.el.ELResolver
javax.el.ELException
public void setValue(javax.el.ELContext elContext, Object base, Object property, Object value) throws javax.el.ELException
setValue
in class javax.el.ELResolver
javax.el.ELException
public boolean isReadOnly(javax.el.ELContext elContext, Object base, Object property) throws javax.el.ELException
isReadOnly
in class javax.el.ELResolver
javax.el.ELException
public Iterator<FeatureDescriptor> getFeatureDescriptors(javax.el.ELContext elContext, Object base)
getFeatureDescriptors
in class javax.el.ELResolver
public Class<?> getCommonPropertyType(javax.el.ELContext elContext, Object base)
getCommonPropertyType
in class javax.el.ELResolver
protected WebApplicationContext getWebApplicationContext(javax.el.ELContext elContext)
The default implementation delegates to FacesContextUtils,
returning null
if no WebApplicationContext found.
elContext
- the current JSF ELContext
FacesContextUtils.getWebApplicationContext(javax.faces.context.FacesContext)
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |