use of com.evolveum.midpoint.gui.api.component.BasePanel in project midpoint by Evolveum.
the class FutureUpdateBehavior method onTimer.
@Override
protected void onTimer(final AjaxRequestTarget target) {
if (future == null || !future.isDone()) {
return;
}
try {
T data = future.get();
Component component = getComponent();
if (component instanceof BasePanel) {
BasePanel<T> panel = (BasePanel<T>) component;
panel.getModel().setObject(data);
} else {
if (component.getDefaultModel() == null) {
component.setDefaultModel(new Model());
}
component.setDefaultModelObject(data);
}
stop(target);
onPostSuccess(target);
} catch (InterruptedException ex) {
handleError(ex, target);
} catch (ExecutionException ex) {
handleError(ex, target);
}
}
Aggregations