|
From: Rod J. <rod...@in...> - 2003-11-21 16:24:21
|
> Of course, the variant to adding more and more mechanisms to access
> other objects is to put in some (optional) support for an expresion
> language inside the bean factory. I've been thinking about this for a
> while now.
+1
>
> So assuming that there is a generic expression language plugin facility,
> and which expression language to use is denoted by a prefix, a
> hypothetical OGNL example for your case would be:
>
> <bean id="myBean" class="org.me.myClass">
> <property
>
name="myProp"><expr>ognl:@System@getProperties()['my.property.name']</expr><
/property>
> </bean>
>
> And if you expose the current factory into the OGNL context, then you
> could have expressions such as:
>
> <bean id="myBean" class="org.me.myClass">
> <property
>
name="myProp"><expr>ognl:factory.getBean('another-bean-id').someProperty</ex
pr></property>
> </bean>
I think it's important that we don't sink under steady feature creep of
supporting more and more single-scenario solutions. So a more general
solution would be better.
Another 1.1 feature, perhaps.
Regards,
Rod
|