0

Is there any front Controller in Zk like Struts framework to accept requests

asked 2010-09-16 06:49:54 +0800

drajasuman gravatar image drajasuman
342 1

Is there any front Controller like in Struts..To accept the events from ZUL?

for example: i have zul file. in that one button is there.
I clicked on button, does any Front Controller handles the request? I was not clear about the controller part in ZK.

plz solve my query?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2010-09-16 11:09:29 +0800

robertpic71 gravatar image robertpic71
1275 1

There is no webflow.xml (struts: struts-config.xml) in ZK [1]. ZK is event-driven and works like a simplified Swing.

[1] Of course there some extension like ZK Spring Webflow and ZK Webflow.

The most convient way seems to use a composer for each idspace.
<window .. apply="com.package.Controller"..>
or <window apply="${springResourceName}"..> to retrieve a managed controller (i.e. Spring via SpringVariableResolver)

Instead of writing listeners like swing you could use autobinding/autoforwarding:
<button id="submit" label="Submit"/>

public onClick$submit() {
// handle submit

or
<button id="submit" label="Submit" forward="onSubmit"/>
public onSubmit() {
...

Check my side for a simple Struts vs. ZK example and also the MVC Smalltalks.

/Robert

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-16 06:49:54 +0800

Seen: 323 times

Last updated: Sep 16 '10

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