0

zk-spring integration

asked 2010-09-10 02:03:31 +0800

bendre gravatar image bendre
30

hi every one

i am using spring framework and zk as client side.
can any one tell me how to connect zk with spring.
using spring MVC or directly using service locator pattern( extends BaseWindowComposer).

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-09-12 07:10:04 +0800

mfehlau gravatar image mfehlau
45

hi bendre,

which spring module do you mean? there are good small talks for spring security and spring webflow (here)

To work directly with spring bean-controller, you could handle it this way:

in *.zul:
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver" ?>
<window id="win" apply="${testComposer}" > ... </window>

where "testcontroller" is a spring bean like:
@Controller("testComposer")
@Scope("singleton")
public class TestComposer extends GenericForwardComposer {

.....
}

An other option is to use

SpringUtil.getBean('beanName")
in the zk-controller.

regards

link publish delete flag offensive edit

answered 2010-09-12 23:57:26 +0800

bendre gravatar image bendre
30

Hi mfehlau

can u tell me diff. between both. which one is suitable for large web application(work directly with spring bean-controller or spring webflow).

link publish delete flag offensive edit

answered 2010-09-13 05:47:07 +0800

mfehlau gravatar image mfehlau
45

updated 2010-09-13 05:48:29 +0800

Hi,

we use the first option in our project because in this option, the zk composer is a spring-bean, so we could use IoC, DI, Spring Transaction Management and so on directly. Plz read this page for diffs.

For us, the small talk for "native" spring webflow doesn't work on ZK 5.03., so we decided to use the zwf-solution: tutorial.

regards

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: 2010-09-10 02:03:31 +0800

Seen: 736 times

Last updated: Sep 13 '10

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