use of org.zkoss.zk.ui.IdSpace in project collect by openforis.
the class NodeDefinitionVM method validateForm.
protected void validateForm(@ContextParam(ContextType.BINDER) Binder binder) {
Component view = binder.getView();
IdSpace currentIdSpace = view.getSpaceOwner();
Component formComponent = Path.getComponent(currentIdSpace, FORM_CONTAINER_ID);
Binder formComponentBinder = (Binder) formComponent.getAttribute("binder");
formComponentBinder.postCommand("applyChanges", null);
}
use of org.zkoss.zk.ui.IdSpace in project collect by openforis.
the class SchemaVM method validateForm.
protected void validateForm(@ContextParam(ContextType.BINDER) Binder binder) {
Component view = binder.getView();
IdSpace idSpace = view.getSpaceOwner();
Binder formComponentBinder = getNodeFormBinder(idSpace);
formComponentBinder.postCommand(VALIDATE_COMMAND, null);
}
use of org.zkoss.zk.ui.IdSpace in project collect by openforis.
the class CodeListsPopUpVM method getSelectedCodeList.
private CodeList getSelectedCodeList(Binder binder) {
Component view = binder.getView();
IdSpace spaceOwner = view.getSpaceOwner();
Component innerInclude = spaceOwner.getFellow("codeListsInclude");
Component managerContainer = innerInclude.getSpaceOwner().getFellow("codeListsManagerContainer");
CodeListsVM vm = (CodeListsVM) managerContainer.getAttribute("vm");
CodeList codeList = vm.getSelectedItem();
return codeList;
}
use of org.zkoss.zk.ui.IdSpace 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