public class JsfManagedBeanPropertyAccessor
extends java.lang.Object
implements org.springframework.expression.PropertyAccessor
Spring EL PropertyAccessor that checks request, session, and application scopes for existing JSF-managed beans. This allows traditional JSF-managed beans (defined in faces-config.xml) to be resolved through expressions in a flow definition.
The preferred approach is to instead use Spring to configure such beans, but this is meant to ease migration for users with existing JSF artifacts. This resolver will delegate to a temporary FacesContext so that JSF managed bean initialization will be triggered if the bean has not already been initialized by JSF.
Source code adapted from JsfManagedBeanResolver
.
Constructor and Description |
---|
JsfManagedBeanPropertyAccessor() |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead(org.springframework.expression.EvaluationContext context,
java.lang.Object target,
java.lang.String name) |
boolean |
canWrite(org.springframework.expression.EvaluationContext context,
java.lang.Object target,
java.lang.String name) |
java.lang.Class<?>[] |
getSpecificTargetClasses() |
org.springframework.expression.TypedValue |
read(org.springframework.expression.EvaluationContext context,
java.lang.Object target,
java.lang.String name) |
void |
write(org.springframework.expression.EvaluationContext context,
java.lang.Object target,
java.lang.String name,
java.lang.Object newValue) |
public java.lang.Class<?>[] getSpecificTargetClasses()
getSpecificTargetClasses
in interface org.springframework.expression.PropertyAccessor
public boolean canRead(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name) throws org.springframework.expression.AccessException
canRead
in interface org.springframework.expression.PropertyAccessor
org.springframework.expression.AccessException
public org.springframework.expression.TypedValue read(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name) throws org.springframework.expression.AccessException
read
in interface org.springframework.expression.PropertyAccessor
org.springframework.expression.AccessException
public boolean canWrite(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name) throws org.springframework.expression.AccessException
canWrite
in interface org.springframework.expression.PropertyAccessor
org.springframework.expression.AccessException
public void write(org.springframework.expression.EvaluationContext context, java.lang.Object target, java.lang.String name, java.lang.Object newValue) throws org.springframework.expression.AccessException
write
in interface org.springframework.expression.PropertyAccessor
org.springframework.expression.AccessException