use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class BinderListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (newBinderDropdown == source) {
doNewBinderCallout(ureq);
} else if (newBinderFromCourseButton == source) {
doNewBinderFromCourse(ureq);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
BinderRow row = model.getObject(se.getIndex());
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("open".equals(cmd)) {
BinderRow row = (BinderRow) link.getUserObject();
Activateable2 activateable = doOpenBinder(ureq, row);
if (activateable != null) {
activateable.activate(ureq, null, null);
}
}
}
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 DeletedPageListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof FlexiTableRenderEvent) {
FlexiTableRenderEvent se = (FlexiTableRenderEvent) event;
deleteButton.setVisible(se.getRendererType() == FlexiTableRendererType.classic && model.getRowCount() > 0);
tableEl.setSelectAllEnable(tableEl.getRendererType() == FlexiTableRendererType.classic);
} else if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select-page".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
doOpenRow(ureq, row, false);
} else if ("restore".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPage()) {
doRestorePage(ureq, row);
}
}
}
} else if (deleteButton == source) {
doConfirmDelete(ureq);
}
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 QEducationalContextsAdminController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == createType) {
doEdit(ureq, null);
} else if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if ("delete-level".equals(se.getCommand())) {
QEducationalContext row = model.getObject(se.getIndex());
doConfirmDelete(ureq, row);
} else if ("translate".equals(se.getCommand())) {
QEducationalContext row = model.getObject(se.getIndex());
doOpenTranslationTool(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 IdentityCompetencesController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addManageButton == source) {
doSelectTaxonomyLevelsToAdd(ureq, TaxonomyCompetenceTypes.manage);
} else if (addTeachButton == source) {
doSelectTaxonomyLevelsToAdd(ureq, TaxonomyCompetenceTypes.teach);
} else if (addHaveButton == source) {
doSelectTaxonomyLevelsToAdd(ureq, TaxonomyCompetenceTypes.have);
} else if (addTargetButton == source) {
doSelectTaxonomyLevelsToAdd(ureq, TaxonomyCompetenceTypes.target);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
IdentityCompetenceRow row = tableModel.getObject(se.getIndex());
if ("remove".equals(se.getCommand())) {
doConfirmRemove(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 TaxonomyLevelCompetenceController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (addCompetencesButton == source) {
doAddCompetence(ureq);
} else if (removeCompetencesButton == source) {
doConfirmRemoveCompetences(ureq);
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select".equals(cmd)) {
TaxonomyLevelCompetenceRow row = tableModel.getObject(se.getIndex());
doSelectTaxonomyLevelCompetence(ureq, row);
}
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations