-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Use/Apply improve to support geting bean from spring.
such as: <window use="spring:com.demo.zk.TestWindow"/>
<window apply="spring:com.demo.zk.TestComposer"/>
I want to set my zk composer or use extended componet bean to managed by spring context.
I think it's a nice way to config like :
<window use="spring:com.demo.zk.TestWindow"/> <window apply="spring:com.demo.zk.TestComposer"/>
Do you like that style or anyone have another good idea??
What's wrong with current scheme of specifying a variable resolver?
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?> ... <window apply="${springBeanId}"/>
Using your syntax, I'd never specify a class name since Spring already knows about it in its bean definition. Specifying the class name here, too, is simply redundant. With a Spring context alive, you should just specify the bean id, like so:
<window apply="spring:springBeanId"/>
Having said all that, how does this "improve" over the current variable-resolver + "${}" method? It's certainly different; not sure if it's an improvement.
Asked: 2009-12-16 21:34:29 +0800
Seen: 729 times
Last updated: Dec 17 '09