use of org.openforis.collect.designer.util.MessageUtil.CompleteConfirmHandler in project collect by openforis.
the class SurveyErrorsPopUpVM method initEventListeners.
protected static void initEventListeners(Window popUp, final ConfirmHandler confirmHandler) {
IdSpace idSpace = popUp.getSpaceOwner();
Component okButton = Path.getComponent(idSpace, OK_BUTTON_ID);
okButton.addEventListener(ON_CLICK_EVENT, new EventListener<Event>() {
public void onEvent(Event arg0) throws Exception {
confirmHandler.onOk();
}
});
Component cancelButton = Path.getComponent(idSpace, CANCEL_BUTTON_ID);
cancelButton.addEventListener(ON_CLICK_EVENT, new EventListener<Event>() {
public void onEvent(Event arg0) throws Exception {
if (confirmHandler instanceof CompleteConfirmHandler) {
((CompleteConfirmHandler) confirmHandler).onCancel();
}
}
});
}
Aggregations