JSF-Spring

de.mindmatters.faces.spring.factory
Class ValueBindingResolvingPropertyConfigurer

java.lang.Object
  extended by de.mindmatters.faces.spring.factory.ValueBindingResolvingPropertyConfigurer
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, BeanFactoryPostProcessor

public final class ValueBindingResolvingPropertyConfigurer
extends java.lang.Object
implements BeanNameAware, BeanFactoryAware, BeanFactoryPostProcessor

A property configurer that resolves value bindings in bean property values of context definitions.

The syntax follows the JSF EL style:

          #{...}
 

Example XML context definition:

 <bean id="myPerson" class="foo.Person">
   <property name="firstname"><value>John</value></property>
   <property name="lastname"><value>Doe</value></property>
 </bean>
                                      
 <bean id="info" class="foo.PersonInfo">
   <property name="firstnameOfPerson"><value>#{myPerson.firstname}</value></property>
   <property name="lastnameOfPerson"><value>#{myPerson.lastname}</value></property>
   <property name="hasPersonSecondname"><value>#{myPerson.secondname != null}</value></property>
 </bean>
 

ValueBindingResolvingPropertyConfigurer checks simple property values, lists, maps, and props.

Author:
Andreas Kuhrwahl

Constructor Summary
ValueBindingResolvingPropertyConfigurer()
           
 
Method Summary
 void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactoryToProcess)
          Modify the application context's internal bean factory after its standard initialization.
 void setBeanFactory(BeanFactory beanFactory)
          Callback that supplies the owning factory to a bean instance.
 void setBeanName(java.lang.String name)
          Set the name of the bean in the bean factory that created this bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueBindingResolvingPropertyConfigurer

public ValueBindingResolvingPropertyConfigurer()
Method Detail

setBeanName

public void setBeanName(java.lang.String name)
Set the name of the bean in the bean factory that created this bean.

Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method.

Specified by:
setBeanName in interface BeanNameAware
Parameters:
name - the name of the bean in the factory

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance.

Invoked after the population of normal bean properties but before an initialization callback such as InitializingBean.afterPropertiesSet() or a custom init-method.

Specified by:
setBeanFactory in interface BeanFactoryAware
Parameters:
beanFactory - owning BeanFactory (may not be null). The bean can immediately call methods on the factory.
See Also:
BeanInitializationException

postProcessBeanFactory

public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactoryToProcess)
Modify the application context's internal bean factory after its standard initialization. All bean definitions will have been loaded, but no beans will have been instantiated yet. This allows for overriding or adding properties even to eager-initializing beans.

Specified by:
postProcessBeanFactory in interface BeanFactoryPostProcessor
Parameters:
beanFactoryToProcess - the bean factory used by the application context

JSF-Spring

Copyright © 2006 mindmatters GmbH & Co. KG