-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All
I try to create a Textbox at window onCreate, and want to bind it.
But there are something wrong against my expect.
I use the zk demo site to describe my problem.
In the data binding sample code, I add the follow code on window and try to run it.
<attribute name="onCreate"> <![CDATA[ AnnotateDataBinder binder = (AnnotateDataBinder) self.getAttribute("binder", Component.COMPONENT_SCOPE); Textbox nameTbox = new Textbox(); nameTbox.setParent(self); binder.addBinding(nameTbox, "value", "selected.firstName"); binder.loadComponent(nameTbox); ]]> </attribute>
Q1:
The new nameTbox can display name of first row.
But when I select other row, it's value not change.
Q2:
If I mark the follow tag in grid as comment, and run it again.
<!-- <textbox value="@{selected.firstName}" /> -->
How cat I solve these problems ?
Thanks for your help.
Asked: 2010-12-22 22:38:32 +0800
Seen: 389 times
Last updated: Dec 30 '10