-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hi,
I try the first time with ZK + Databind.
*How do I reload teh values, when I changed data. *
The databinding works fine, I see two field with the values, now I try to have a buttom, which change a value and I want to show the changed data in the field.
I tried it like this. (see below). but the "binder.loadAll" does not show the new value "* New *".
Any idea, what could be wrong ?
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<zk>
<zscript>
<![CDATA[
import de.gramberg.model.Gutacht;
Gutacht gut = new Gutacht();
//prepare the AnnotateDataBinder
AnnotateDataBinder binder = new AnnotateDataBinder();
binder.bindBean("gut", gut);
]]>
</zscript>
.........
<button label="new-value / Reload"
onClick='gut.setKurz( "*** New ***");binder.loadAll()' />
<intbox value="@{gut.nr, save-when='self.onChange'}" />
<textbox value="@{gut.kurz, save-when='self.onChange'}" />
....
</zk>
Java Code
public String getKurz() {
return _kurz;
}
public void setKurz(String kurz) {
_kurz = kurz;
}