0

Feature request: Use/Apply support get bean from spring context

asked 2009-12-16 21:34:29 +0800

jentrees gravatar image jentrees
51 1

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??

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-12-17 07:08:55 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-12-16 21:34:29 +0800

Seen: 729 times

Last updated: Dec 17 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More