Class WebApplicationContextFacesELResolver
java.lang.Object
jakarta.el.ELResolver
org.springframework.web.jsf.el.WebApplicationContextFacesELResolver
public class WebApplicationContextFacesELResolver
extends jakarta.el.ELResolver
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 Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.LogLogger available to subclasses.static final StringName of the exposed WebApplicationContext variable: "webApplicationContext". -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> getCommonPropertyType(jakarta.el.ELContext elContext, Object base) protected @Nullable WebApplicationContextgetWebApplicationContext(jakarta.el.ELContext elContext) Retrieve theWebApplicationContextreference to expose.booleanisReadOnly(jakarta.el.ELContext elContext, Object base, Object property) voidMethods inherited from class jakarta.el.ELResolver
convertToType, invoke
-
Field Details
-
WEB_APPLICATION_CONTEXT_VARIABLE_NAME
Name of the exposed WebApplicationContext variable: "webApplicationContext".- See Also:
-
logger
protected final org.apache.commons.logging.Log loggerLogger available to subclasses.
-
-
Constructor Details
-
WebApplicationContextFacesELResolver
public WebApplicationContextFacesELResolver()
-
-
Method Details
-
getValue
-
getType
-
setValue
-
isReadOnly
-
getCommonPropertyType
-
getWebApplicationContext
Retrieve 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:
-