Package org.springframework.web.jsf.el
Class WebApplicationContextFacesELResolver
java.lang.Object
jakarta.el.ELResolver
org.springframework.web.jsf.el.WebApplicationContextFacesELResolver
Special JSF 
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>
- Since:
- 2.5
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final LogLogger available to subclasses.static final StringName of the exposed WebApplicationContext variable: "webApplicationContext".Fields inherited from class jakarta.el.ELResolverRESOLVABLE_AT_DESIGN_TIME, TYPE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionClass<?>getCommonPropertyType(ELContext elContext, Object base) getFeatureDescriptors(ELContext elContext, Object base) Class<?>protected WebApplicationContextgetWebApplicationContext(ELContext elContext) Retrieve theWebApplicationContextreference to expose.booleanisReadOnly(ELContext elContext, Object base, Object property) voidMethods inherited from class jakarta.el.ELResolverconvertToType, invoke
- 
Field Details- 
WEB_APPLICATION_CONTEXT_VARIABLE_NAMEName of the exposed WebApplicationContext variable: "webApplicationContext".- See Also:
 
- 
loggerLogger available to subclasses.
 
- 
- 
Constructor Details- 
WebApplicationContextFacesELResolverpublic WebApplicationContextFacesELResolver()
 
- 
- 
Method Details- 
getValue@Nullable public Object getValue(ELContext elContext, @Nullable Object base, Object property) throws ELException - Specified by:
- getValuein class- ELResolver
- Throws:
- ELException
 
- 
getType@Nullable public Class<?> getType(ELContext elContext, @Nullable Object base, Object property) throws ELException - Specified by:
- getTypein class- ELResolver
- Throws:
- ELException
 
- 
setValuepublic void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException - Specified by:
- setValuein class- ELResolver
- Throws:
- ELException
 
- 
isReadOnly- Specified by:
- isReadOnlyin class- ELResolver
- Throws:
- ELException
 
- 
getFeatureDescriptors@Nullable public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object base) - Specified by:
- getFeatureDescriptorsin class- ELResolver
 
- 
getCommonPropertyType- Specified by:
- getCommonPropertyTypein class- ELResolver
 
- 
getWebApplicationContextRetrieve theWebApplicationContextreference to expose.The default implementation delegates to FacesContextUtils, returningnullif noWebApplicationContextfound.- Parameters:
- elContext- the current JSF ELContext
- Returns:
- the Spring web application context
- See Also:
 
 
-