0

request in ZK?

asked 2010-02-15 12:02:17 +0800

scerro gravatar image scerro
273 3 9
www.desarrolloagil.es

Hi all,

Is it possible with ZK Framework to use a variable for passing parameters between controller and zul pages like the "request" in struts framework?

thanks in advance.

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-02-15 13:23:32 +0800

kesavkolla gravatar image kesavkolla
180 3

Yes it's very well possible. There are two ways you could do a two way data binding and one way variable substitution.

variable substitution:

In your composer you can set page.setAttribute("name", "value") and in your zul you can do <textbox value="${name}" />. This will put the "value" into textbox.

Databinding:

Person p = new Person();
p.setFirstName("Kesav");
p.setLastName("Kolla");
page.setAttribute("person", p);

in you zul you can bind those two properties to textboxes:

<textbox value="@{person.firstName}" />
<textbox value="@{person.lastName}" />

The above is a two way data binding. The person object will be updated as soon as some value in the textbox is changed.

HTH

link publish delete flag offensive edit

answered 2010-02-16 03:25:31 +0800

scerro gravatar image scerro
273 3 9
www.desarrolloagil.es

Thank you friend!

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-02-15 12:02:17 +0800

Seen: 300 times

Last updated: Feb 16 '10

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