private final Poller poller;
private boolean indeterminate = false;
private boolean pollerSuspendedDueDetach;
+ private int interval;
public VProgressIndicator() {
setElement(DOM.createDiv());
}
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
- if (client.updateComponent(this, uidl, true)) {
- return;
- }
-
- poller.cancel();
this.client = client;
+ if (!uidl.getBooleanAttribute("cached")) {
+ poller.cancel();
+ }
if (client.updateComponent(this, uidl, true)) {
return;
}
}
if (!uidl.getBooleanAttribute("disabled")) {
- poller.scheduleRepeating(uidl.getIntAttribute("pollinginterval"));
+ interval = uidl.getIntAttribute("pollinginterval");
+ poller.scheduleRepeating(interval);
}
}
protected void onAttach() {
super.onAttach();
if (pollerSuspendedDueDetach) {
- poller.run();
+ poller.scheduleRepeating(interval);
}
}