[jboss-user] [Microcontainer] - Re: Nested property reference
trustin
do-not-reply at jboss.com
Thu Nov 15 20:49:30 EST 2007
"alesj" wrote : <bean id="beanX" ...>
| | <property name="propA.propB" value="C"/>
| | </bean>
|
| This one I don't like, since it means instantiating an anonymous bean with a lot less control for propA.
It actually doesn't create any anonymous bean but it's identical to the following Java code:
beanX.getPropA().setPropB("C");
It's often very useful when you want to modify a property of a read-only property (i.e. propA = read only, propB = writable).
"alesj" wrote : <bean id="beanY" ...>
| | <property name="propC" ref="beanX.propA.propB" />
| | </bean>
|
| This can be trivially added to our inject element:
|
| <inject bean="beanX" property="propA.propB"/>
Sounds great!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105289#4105289
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105289
More information about the jboss-user
mailing list