-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I have a simple controller which also acts as a JMX Notification Listener. Whenever I get a JMX notification I see the message on the first line of handleNotification(...) logged but setX("whatever") does nothing.
public class MyController implements NotificationListener
{
private String x;
public void setX(String x) {
this.x = x;
}
public String getX() {
return x;
}
@Override
public void handleNotification(Notification n, Object handback)
{
LOG.info("handleNotification called");
setX(n.getMessage()); // supposed to update text on button, but does not.
// trying to post notifychange event manually
BindUtils.postNotifyChange(null,null,this,"x");
}
}
In my zul file I have simply:
<div viewModel="@id('vm') @init('com.foo.MyController')">
<button label="@load(vm.x)"/>
</div>
So what can be the problem? I think handleNotification might be called on another thread and that's why notifychange does not work?
Asked: 2016-08-09 08:43:50 +0800
Seen: 40 times
Last updated: Aug 09 '16
MVVM Notifychange works only along with @Command ?
Upload csv files with Zk framework
MVVM Notifychange for bean property not working ?
Create notification icon with zk 7 CE
@NotifyChange not refresh textbox
how can i get data from another page
Notify Form of property change
If there is no execution, the notify will nog happen. You either need tot implementatie long operationeel for it. Check robert his small talk about long operationeel and his great solution
chillworld ( 2016-08-11 19:31:44 +0800 )editThank you, I will check it out.
tisaksen ( 2016-08-12 13:23:52 +0800 )edit