Search in sources :

Example 1 with IdSpace

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);
}
Also used : Binder(org.zkoss.bind.Binder) IdSpace(org.zkoss.zk.ui.IdSpace) Component(org.zkoss.zk.ui.Component)

Example 2 with IdSpace

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);
}
Also used : Binder(org.zkoss.bind.Binder) IdSpace(org.zkoss.zk.ui.IdSpace) Component(org.zkoss.zk.ui.Component)

Example 3 with IdSpace

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;
}
Also used : CodeList(org.openforis.idm.metamodel.CodeList) IdSpace(org.zkoss.zk.ui.IdSpace) Component(org.zkoss.zk.ui.Component)

Example 4 with IdSpace

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();
            }
        }
    });
}
Also used : CompleteConfirmHandler(org.openforis.collect.designer.util.MessageUtil.CompleteConfirmHandler) Event(org.zkoss.zk.ui.event.Event) IdSpace(org.zkoss.zk.ui.IdSpace) Component(org.zkoss.zk.ui.Component)

Aggregations

Component (org.zkoss.zk.ui.Component)4 IdSpace (org.zkoss.zk.ui.IdSpace)4 Binder (org.zkoss.bind.Binder)2 CompleteConfirmHandler (org.openforis.collect.designer.util.MessageUtil.CompleteConfirmHandler)1 CodeList (org.openforis.idm.metamodel.CodeList)1 Event (org.zkoss.zk.ui.event.Event)1