I have one confusion use between @NotifyChange and BindUtils.postNotifyChange ,Why use this two event .Before i read this question In ZK Can we PostNotifyChange more than one variables . But i cant understand this question why use this more than one variable.
Here's an example:
@Command
@NotifyChange({ "folderInfoList", "isDisabled", "selectedFolderInfo" })
public void refreshFolderInfo() {
logger.debug("Refresh Icon selected");
if (isDirty()) {
Messagebox.show(pageResourceBundle.getText("JS_CONFIRM_DATAMODIFED"), pageResourceBundle.getText("JS_CONFIRM_DATAMODIFED_TYPE"),
Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
if (Messagebox.ON_OK.equals(event.getName())) {
loadFolderInfoList();
selectedFolderInfo = null;
BindUtils.postNotifyChange(null, null, FolderInfoEditViewModel.this, "folderInfoList");
} else {
}
}
});
} else {
loadFolderInfoList();
selectedFolderInfo = null;
}
}
Can anybody tell me:
I have four question :
1.Why use isDisabled in @NotifyChange ?
2.Here this method i can use @NotifyChange instead of BindUtils.postNotifyChange ?
3.What is the difference between @NotifyChange and BindUtils.postNotifyChange ?
4.I want to use only one event between this two @NotifyChange and BindUtils.postNotifyChange in method .Is it possible for this method ?