use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project OpenOLAT by OpenOLAT.
the class VideoAdminTranscodingController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == transcodingTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
TranscodingRow currentObject = tableModel.getObject(se.getIndex());
if ("quality.delete".equals(se.getCommand())) {
queueDeleteTranscoding(currentObject);
showInfo("delete.transcodings");
} else if ("quality.transcode".equals(se.getCommand())) {
queueCreateTranscoding(currentObject);
showInfo("info.transcoding");
}
}
}
reloadTable();
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project OpenOLAT by OpenOLAT.
the class TaxonomyTreeTableController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (newLevelButton == source) {
doNewLevel(ureq);
} else if (deleteButton == source) {
doConfirmMultiDelete(ureq);
} else if (mergeButton == source) {
doMerge(ureq);
} else if (typeButton == source) {
doAssignType(ureq);
} else if (moveButton == source) {
doMove(ureq);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
TaxonomyLevelRow row = model.getObject(se.getIndex());
doSelectTaxonomyLevel(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
loadModel(true, true);
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("tools".equals(cmd)) {
TaxonomyLevelRow row = (TaxonomyLevelRow) link.getUserObject();
doOpenTools(ureq, row, link);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project OpenOLAT by OpenOLAT.
the class TaxonomyLevelTypesEditController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addRootTypeButton == source) {
doAddRootType(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("tools".equals(cmd)) {
TaxonomyLevelTypeRow row = (TaxonomyLevelTypeRow) link.getUserObject();
doOpenTools(ureq, row, link);
}
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("edit".equals(cmd)) {
TaxonomyLevelTypeRow row = model.getObject(se.getIndex());
doEditLevelType(ureq, row.getType());
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project OpenOLAT by OpenOLAT.
the class AbstractMemberListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == membersTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
MemberView row = memberListModel.getObject(se.getIndex());
if (TABLE_ACTION_IM.equals(cmd)) {
doIm(ureq, row);
} else if (TABLE_ACTION_EDIT.equals(cmd)) {
openEdit(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
String cmd = event.getCommand();
if (FlexiTableSearchEvent.SEARCH.equals(event.getCommand())) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
String search = se.getSearch();
doSearch(search);
} else if (FlexiTableSearchEvent.QUICK_SEARCH.equals(event.getCommand())) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
String search = se.getSearch();
doSearch(search);
} else if (FlexiTableSearchEvent.RESET.getCommand().equals(cmd)) {
doResetSearch();
}
}
} else if (editButton == source) {
List<MemberView> selectedItems = getMultiSelectedRows();
openEdit(ureq, selectedItems);
} else if (mailButton == source) {
List<MemberView> selectedItems = getMultiSelectedRows();
doSendMail(ureq, selectedItems);
} else if (removeButton == source) {
List<MemberView> selectedItems = getMultiSelectedRows();
confirmDelete(ureq, selectedItems);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("tools".equals(cmd)) {
MemberView row = (MemberView) link.getUserObject();
doOpenTools(ureq, row, link);
} else if ("im".equals(cmd)) {
MemberView row = (MemberView) link.getUserObject();
doIm(ureq, row);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project OpenOLAT by OpenOLAT.
the class CorrectionAssessmentItemListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
CorrectionAssessmentItemRow row = tableModel.getObject(se.getIndex());
if ("select".equals(cmd)) {
// accept all
doSelect(ureq, row, r -> true);
} else if ("answered".equals(cmd)) {
// accept all
doSelect(ureq, row, new ResponsedPredicate(row, true));
} else if ("notAnswered".equals(cmd)) {
// accept all
doSelect(ureq, row, new ResponsedPredicate(row, false));
} else if ("autoCorrected".equals(cmd)) {
doSelect(ureq, row, entry -> !row.isManualCorrection() && entry.getManualScore() == null);
} else if ("corrected".equals(cmd)) {
doSelect(ureq, row, entry -> entry.getManualScore() != null);
} else if ("notCorrected".equals(cmd)) {
doSelect(ureq, row, entry -> row.isManualCorrection() && entry.getManualScore() == null);
} else if ("toReview".equals(cmd)) {
doSelect(ureq, row, AssessmentItemListEntry::isToReview);
}
}
} else if (saveTestsButton == source) {
doConfirmSaveTests(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
if ("tools".equals(link.getCmd())) {
doOpenTools(ureq, (CorrectionAssessmentItemRow) link.getUserObject(), link);
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations