use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class GTASampleSolutionsEditController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addSolutionLink == source) {
doAddSolution(ureq);
} else if (createSolutionLink == source) {
doCreateSolution(ureq);
} else if (solutionTable == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
SolutionRow row = solutionModel.getObject(se.getIndex());
if ("edit".equals(se.getCommand())) {
doEdit(ureq, row.getSolution());
} else if ("delete".equals(se.getCommand())) {
doDelete(ureq, row);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class GTACoachedGroupListController 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();
CoachedGroupRow row = tableModel.getObject(se.getIndex());
if ("details".equals(cmd) || "select".equals(cmd)) {
doSelect(ureq, row.getBusinessGroup());
} else if ("duedates".equals(cmd)) {
doEditDueDate(ureq, row);
}
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class GTACoachedParticipantListController 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();
CoachedIdentityRow row = tableModel.getObject(se.getIndex());
if ("duedates".equals(cmd)) {
doEditDueDate(ureq, row);
} else if (StringHelper.containsNonWhitespace(cmd)) {
fireEvent(ureq, new SelectIdentityEvent(row.getIdentity().getIdentityKey()));
}
}
} else if (extendButton == source) {
List<CoachedIdentityRow> rows = getSelectedRows();
doEditMultipleDueDates(ureq, rows);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("mark".equals(cmd)) {
Long assessableIdentityKey = (Long) link.getUserObject();
boolean marked = doToogleMark(ureq, assessableIdentityKey);
link.setIconLeftCSS(marked ? Mark.MARK_CSS_LARGE : Mark.MARK_ADD_CSS_LARGE);
link.getComponent().setDirty(true);
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class SubmitDocumentsController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (uploadDocButton == source) {
if (checkOpen(ureq) && checkDeadline(ureq)) {
doOpenDocumentUpload(ureq);
}
} else if (createDocButton == source) {
if (checkOpen(ureq) && checkDeadline(ureq)) {
doChooseFilename(ureq);
}
} else if (tableEl == source) {
if (checkOpen(ureq) && checkDeadline(ureq) && event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
SubmittedSolution row = model.getObject(se.getIndex());
if ("delete".equals(se.getCommand())) {
doConfirmDelete(ureq, row);
} else if ("edit".equals(se.getCommand())) {
doEdit(ureq, row);
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
if ("view".equals(link.getCmd())) {
doView(ureq, (String) link.getUserObject());
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class SelectTestOrSurveyController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
AssessmentNodeData data = tableModel.getObject(se.getIndex());
archiver.setData(data);
if (validateFormLogic(ureq)) {
fireEvent(ureq, new SelectTestOrSurveyEvent(archiver, data));
}
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations