Class JsfManagedBeanResolver

java.lang.Object
jakarta.el.ELResolver
org.springframework.faces.webflow.JsfManagedBeanResolver

public class JsfManagedBeanResolver extends jakarta.el.ELResolver
ELResolver 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.
Author:
Jeremy Grelle, Phillip Webb
  • Constructor Details

    • JsfManagedBeanResolver

      public JsfManagedBeanResolver()
  • Method Details

    • getCommonPropertyType

      public Class<?> getCommonPropertyType(jakarta.el.ELContext context, Object base)
      Specified by:
      getCommonPropertyType in class jakarta.el.ELResolver
    • getFeatureDescriptors

      public Iterator<FeatureDescriptor> getFeatureDescriptors(jakarta.el.ELContext context, Object base)
      Overrides:
      getFeatureDescriptors in class jakarta.el.ELResolver
    • getType

      public Class<?> getType(jakarta.el.ELContext context, Object base, Object property)
      Specified by:
      getType in class jakarta.el.ELResolver
    • getValue

      public Object getValue(jakarta.el.ELContext context, Object base, Object property)
      Specified by:
      getValue in class jakarta.el.ELResolver
    • isReadOnly

      public boolean isReadOnly(jakarta.el.ELContext context, Object base, Object property)
      Specified by:
      isReadOnly in class jakarta.el.ELResolver
    • setValue

      public void setValue(jakarta.el.ELContext context, Object base, Object property, Object value)
      Sets a bean value if a corresponding key is found in one of the ExternalContext scopes.
      Specified by:
      setValue in class jakarta.el.ELResolver