use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class IdentityListCourseNodeController 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();
AssessedIdentityElementRow row = usersTableModel.getObject(se.getIndex());
if ("select".equals(cmd)) {
doSelect(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
loadModel(ureq);
}
} else if (bulkDoneButton == source) {
doSetDone(ureq);
} else if (bulkVisibleButton == source) {
doConfirmVisible(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
if ("tools".equals(link.getCmd())) {
doOpenTools(ureq, (AssessedIdentityElementRow) link.getUserObject(), link);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class AbstractPageListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
loadModel(ureq, se.getSearch());
} else if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("up".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPendingAssignment()) {
doMoveUpAssignment(ureq, row);
}
} else if ("down".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPendingAssignment()) {
doMoveDownAssignment(ureq, row);
}
}
}
} else if (timelineSwitchOnButton == source) {
doSwitchTimelineOff();
} else if (timelineSwitchOffButton == source) {
doSwitchTimelineOn();
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("open.full".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doOpenRow(ureq, row, false);
} else if ("comment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doComment(ureq, row.getPage());
} else if ("close.section".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doConfirmCloseSection(ureq, row);
} else if ("reopen.section".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doConfirmReopenSection(ureq, row);
} else if ("edit.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doEditAssignment(ureq, row);
} else if ("delete.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doConfirmDeleteAssignment(ureq, row);
} else if ("move.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doMoveAssignment(ureq, row);
} else if ("start.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doStartAssignment(ureq, row);
} else if ("open.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doOpenAssignment(ureq, row);
} else if ("up.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doMoveUpAssignment(ureq, row);
} else if ("down.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doMoveDownAssignment(ureq, row);
}
} else if (source instanceof SingleSelection) {
SingleSelection startAssignment = (SingleSelection) source;
if (startAssignment.isOneSelected()) {
String selectedKey = startAssignment.getSelectedKey();
try {
Long key = Long.parseLong(selectedKey);
doStartAssignment(ureq, key);
} catch (Exception e) {
//
}
}
} else if (source == flc) {
if ("ONCLICK".equals(event.getCommand())) {
String category = ureq.getParameter("tag_select");
if (StringHelper.containsNonWhitespace(category)) {
tableEl.quickSearch(ureq, category);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class MediaCenterController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
MediaRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
if (select) {
doSelect(ureq, row.getKey());
} else {
Activateable2 activateable = doOpenMedia(ureq, row.getKey());
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
} else if (event instanceof FlexiTableSearchEvent) {
loadModel();
}
} else if (newMediaCallout == source) {
doOpenNewMediaCallout(ureq, newMediaCallout);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("select".equals(cmd)) {
MediaRow row = (MediaRow) link.getUserObject();
if (select) {
doSelect(ureq, row.getKey());
} else {
Activateable2 activateable = doOpenMedia(ureq, row.getKey());
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
} else if ("tag".equals(cmd)) {
doToggleCategory(link);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class MySharedItemsController 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();
MySharedItemRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
Activateable2 activateable = doSelectBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
} else if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
loadModel(se.getSearch());
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent 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);
}
Aggregations