@Override protected void event(UserRequest ureq, Controller source, Event event) { if (newMethodCtrl == source) { if (event.equals(Event.DONE_EVENT)) { OfferAccess newLink = newMethodCtrl.commitChanges(); newLink = acService.saveOfferAccess(newLink); addConfiguration(newLink); fireEvent(ureq, Event.CHANGED_EVENT); } cmc.deactivate(); cleanUp(); } else if (editMethodCtrl == source) { if (event.equals(Event.DONE_EVENT)) { OfferAccess newLink = editMethodCtrl.commitChanges(); newLink = acService.saveOfferAccess(newLink); replace(newLink); fireEvent(ureq, Event.CHANGED_EVENT); } cmc.deactivate(); cleanUp(); } else if (cmc == source) { cleanUp(); } else { super.event(ureq, source, event); } }
@Override public void event(UserRequest ureq, Component source, Event event) { if (addMethods.contains(source)) { AccessMethod method = (AccessMethod) ((Link) source).getUserObject(); addMethod(ureq, method); } else { super.event(ureq, source, event); } }
@Override protected void event(UserRequest ureq, Controller source, Event event) { if (commentCalloutCtrl == source) { cleanUp(); } else if (editCommentCtrl == source) { if (event == Event.DONE_EVENT) { table.reset(); } commentCalloutCtrl.deactivate(); cleanUp(); } super.event(ureq, source, event); }
@Override protected void event(UserRequest ureq, Controller source, Event event) { if (source == mediaDialogBox) { removeAsListenerAndDispose(mediaDialogBox); removeAsListenerAndDispose(mediaChooserController); mediaDialogBox = null; mediaChooserController = null; } else if (source == mediaChooserController) { if (event instanceof URLChoosenEvent) { URLChoosenEvent choosenEvent = (URLChoosenEvent) event; String url = choosenEvent.getURL(); if (url.startsWith(Settings.getServerContextPathURI())) { // doesn't allow absolute path -> the mapper check if the link is in the list! url = url.substring(Settings.getServerContextPathURI().length()); } currentLink.setTarget(url); currentLink.setIntern(true); currentLink.setHtmlTarget(SELF_KEY); if (StringHelper.containsNonWhitespace(choosenEvent.getDisplayName())) { currentLink.setDescription(choosenEvent.getDisplayName()); } int index = 0; for (TextElement targetEl : lTargetInputList) { if (currentLink.equals(targetEl.getUserObject())) { targetEl.setValue(url); targetEl.setEnabled(false); lDescriptionInputList.get(index).setValue(currentLink.getDescription()); lHtmlTargetInputList.get(index).select(SELF_KEY, true); break; } index++; } } mediaDialogBox.deactivate(); removeAsListenerAndDispose(mediaDialogBox); removeAsListenerAndDispose(mediaChooserController); mediaDialogBox = null; mediaChooserController = null; } super.event(ureq, source, event); }
@Override protected void event(UserRequest ureq, Controller source, Event event) { if (addSolutionCtrl == source) { if (event == Event.DONE_EVENT) { Solution newSolution = addSolutionCtrl.getSolution(); solutions.getSolutions().add(newSolution); fireEvent(ureq, Event.DONE_EVENT); updateModel(); } cmc.deactivate(); cleanUp(); } else if (editSolutionCtrl == source) { if (event == Event.DONE_EVENT) { fireEvent(ureq, Event.DONE_EVENT); updateModel(); } cmc.deactivate(); cleanUp(); } else if (newSolutionCtrl == source) { Solution newSolution = newSolutionCtrl.getSolution(); cmc.deactivate(); cleanUp(); if (event == Event.DONE_EVENT) { solutions.getSolutions().add(newSolution); doCreateSolutionEditor(ureq, newSolution); updateModel(); } } else if (newSolutionEditorCtrl == source) { if (event == Event.DONE_EVENT) { updateModel(); fireEvent(ureq, Event.DONE_EVENT); } cmc.deactivate(); cleanUp(); } else if (editSolutionEditorCtrl == source) { cmc.deactivate(); cleanUp(); } else if (cmc == source) { cleanUp(); } super.event(ureq, source, event); }
@Override public void event(UserRequest ureq, Component source, Event event) { super.event(ureq, source, event); }