use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project OpenOLAT by OpenOLAT.
the class UserListController 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();
StudentStatEntry selectedRow = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
selectStudent(ureq, selectedRow);
}
}
}
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 CourseController 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();
EfficiencyStatementEntry selectedRow = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
doSelectDetails(ureq, selectedRow);
}
}
} else if (source == openCourse) {
doOpenCourse(ureq);
}
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 StudentListController 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();
StudentStatEntry selectedRow = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
selectStudent(ureq, selectedRow);
}
} else if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent ftse = (FlexiTableSearchEvent) event;
String searchString = ftse.getSearch();
model.search(searchString);
tableEl.reset();
tableEl.reloadData();
}
}
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 PoolsController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == poolTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if ("select-pool".equals(se.getCommand())) {
Pool row = model.getObject(se.getIndex());
fireEvent(ureq, new QPoolSelectionEvent(Collections.singletonList(row)));
}
}
} else if (source == selectButton) {
Set<Integer> selectIndexes = poolTable.getMultiSelectedIndex();
if (!selectIndexes.isEmpty()) {
List<Pool> rows = new ArrayList<Pool>(selectIndexes.size());
for (Integer index : selectIndexes) {
Pool row = model.getObject(index.intValue());
rows.add(row);
}
fireEvent(ureq, new QPoolSelectionEvent(rows));
}
}
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 AbstractItemListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == itemsTable) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if ("rSelect".equals(se.getCommand())) {
ItemRow row = model.getObject(se.getIndex());
if (row != null) {
doClick(ureq, row);
}
} else if ("select-item".equals(se.getCommand())) {
ItemRow row = getModel().getObject(se.getIndex());
if (row != null) {
doSelect(ureq, row);
}
} else if ("quick-view".equals(se.getCommand())) {
int rowIndex = se.getIndex();
if (rowIndex >= 0) {
if (itemsTable.isDetailsExpended(rowIndex)) {
itemsTable.collapseDetails(rowIndex);
} else {
itemsTable.collapseAllDetails();
ItemRow row = getModel().getObject(rowIndex);
if (row != null) {
itemsTable.expandDetails(rowIndex);
QuestionItem item = qpoolService.loadItemById(row.getKey());
previewCtrl.updateItem(ureq, item);
quickViewMetadataCtrl.setItem(ureq, item);
}
}
}
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
if ("select".equals(link.getCmd())) {
ItemRow row = (ItemRow) link.getUserObject();
doSelect(ureq, row);
} else if ("mark".equals(link.getCmd())) {
ItemRow row = (ItemRow) link.getUserObject();
if (doMark(row)) {
link.setIconLeftCSS(Mark.MARK_CSS_LARGE);
} else {
link.setIconLeftCSS(Mark.MARK_ADD_CSS_LARGE);
}
link.getComponent().setDirty(true);
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations