This is an example from the spring 3.0 reference:
<bean id="numberGuess" class="org.spring.samples.NumberGuess">
<property name="randomNumber" value="#{ T(java.lang.Math).random() * 100.0 }"/>
</bean>
<bean id="shapeGuess" class="org.spring.samples.ShapeGuess">
<property name="initialShapeSeed" value="#{ numberGuess.randomNumber }"/>
</bean>
But what I intend to do is something like this:
<bean id="foo" class="com.example.Foo">
<property name="name" value="myName"/>
<property name="prop">
<bean class="com.example.Bar">
<property name="#{ parent.name }" />
</bean>
</property>
</bean>
Thus, the property name of the internal bean is populated with the name of the external bean. Is this possible with spring expression language? What would be the expression for something like this (the parent obviously doesn't work ^^)?
Mauli source
share