-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have this zul:
<window id="altaCuenta"
apply="com.agr.ac.MyViewModel">
<div apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('com.agr.ac.MyViewModel')"
form="@id('ac') @Load(vm.ac) @save(vm.ac, before='submit') ">
. .. and this textbox:
<textbox value="@bind(ac.dtPer.lastName)" />
in a method I do this:
@NotifyChange("ac")
public void viewInfo(String lastName) {
ac.getDtoPer().setLastName(lastName);
}
My problem is that the textbox not refresh the lastName value with the @NotifyChange I've tried writing @NotifyChange("ac") and not work
@NotifyChange("ac")
works only on setters and commands.
Now that your method isn't one of both you need to use :
public void viewInfo(String lastName) {
ac.getDtoPer().setLastName(lastName);
BindUtils.postNotifyChange(null,null,ac,"*");
}
Now just one remark to be sure : Are you sure that you have to save before submit? So you will save it also when costraints fails of the form.
Greetz chill.
Asked: 2014-02-19 19:03:07 +0800
Seen: 59 times
Last updated: Feb 19 '14
how can i get data from another page
Problem binding values to a composite component
How to access static member field of a class in zul without zscript
How can i load a constant in .zul
MVVM Validator: class not found ? [closed]
MVVM tab box - delay @load until tab pane displayed?
mvvm, load or save with after or before for seach command
how to fire an event when a variable value loaded through VM