-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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.
Thank you friend!
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
Asked: 2010-02-15 12:02:17 +0800
Seen: 300 times
Last updated: Feb 16 '10