@Override @SuppressWarnings("unused") protected void event(final UserRequest ureq, final Component source, final Event event) { if (STATISTICS_FULL_RECALCULATION_TRIGGER_BUTTON.equals(event.getCommand())) { final StatisticUpdateService statisticUpdateManager = getStatisticUpdateManager(); if (statisticUpdateManager == null) { log.info("event: UpdateStatisticsJob configured, but no StatisticManager available"); } else { final String title = getTranslator().translate("statistics.fullrecalculation.really.title"); final String text = getTranslator().translate("statistics.fullrecalculation.really.text"); dialogCtr_ = DialogBoxUIFactory.createYesNoDialog(ureq, getWindowControl(), title, text); listenTo(dialogCtr_); dialogCtr_.activate(); } } else if (STATISTICS_UPDATE_TRIGGER_BUTTON.equals(event.getCommand())) { final StatisticUpdateService statisticUpdateManager = getStatisticUpdateManager(); if (statisticUpdateManager == null) { log.info("event: UpdateStatisticsJob configured, but no StatisticManager available"); } else { statisticUpdateManager.updateStatistics(false, getUpdateFinishedCallback()); refreshUIState(); content.put( "updatecontrol", new JSAndCSSComponent("intervall", this.getClass(), null, null, false, null, 3000)); getInitialComponent().setDirty(true); } } }
@Override public void event(final Event event) { if (type == AssessmentInstance.QMD_ENTRY_TYPE_ASSESS) { if (event.getCommand().startsWith("ChatWindow")) { checkChats(null); } } }
@Override protected void event(final UserRequest ureq, final Component source, final Event event) { if (source == cpTree) { // FIXME:fj: cleanup between MenuTree.COMMAND_TREENODE_CLICKED and // TreeEvent.dito... if (event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) { final TreeEvent te = (TreeEvent) event; switchToPage(ureq, te); } } else if (source == cpComponent) { if (event instanceof NewInlineUriEvent) { final NewInlineUriEvent nue = (NewInlineUriEvent) event; // adjust the tree selection to the current choice if found selectTreeNode(ureq, nue.getNewUri()); } } }
@Override protected void event(final UserRequest ureq, final Controller source, final Event event) { if (source == tableController) { if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) { final TableEvent te = (TableEvent) event; final String actionid = te.getActionId(); if (actionid.equals(CMD_LAUNCH)) { final int rowid = te.getRowId(); final CalendarEntry calendarEntry = (CalendarEntry) ((DefaultTableDataModel) tableController.getTableDataModel()).getObject(rowid); final Date startDate = calendarEntry.getBegin(); final String activationCmd = "cal." + new SimpleDateFormat("yyyy.MM.dd").format(startDate); final DTabs dts = (DTabs) Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs"); // was brasato:: getWindowControl().getDTabs().activateStatic(ureq, // HomeSite.class.getName(), activationCmd); dts.activateStatic(ureq, HomeSite.class.getName(), activationCmd); } } } }