use of org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent in project openolat by klemens.
the class SharedBindersController 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();
SharedItemRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
Activateable2 activeateable = doSelectBinder(ureq, row);
if (activeateable != null) {
activeateable.activate(ureq, null, null);
}
} else if ("leave".equals(cmd)) {
doConfirmLeaveBinder(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
loadModel(se.getSearch());
} else if ("ONCLICK".equals(event.getCommand())) {
String row = ureq.getParameter("select-section");
String expand = ureq.getParameter("expand-section");
if (StringHelper.isLong(row)) {
doSelectSection(ureq);
} else if (StringHelper.containsNonWhitespace(expand)) {
doExpandSections(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 UserSearchFlexiController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == backLink) {
flc.contextPut("noList", "false");
flc.contextPut("showButton", "false");
if (userTableModel != null) {
userTableModel.setObjects(new ArrayList<>());
tableEl.reset();
}
} else if (searchButton == source) {
if (validateForm(ureq)) {
getWindowControl().getWindowBackOffice().sendCommandTo(new ScrollTopCommand());
doSearch();
}
} else if (tableEl == source) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
Identity chosenIdent = userTableModel.getObject(se.getIndex());
fireEvent(ureq, new SingleIdentityChosenEvent(chosenIdent));
}
} else {
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 LandingPagesAdminController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
RuleWrapper row = model.getObject(se.getIndex());
if ("up".equals(se.getCommand())) {
moveUp(row);
} else if ("down".equals(se.getCommand())) {
moveDown(row);
} else if ("add".equals(se.getCommand())) {
addRow(row);
} else if ("delete".equals(se.getCommand())) {
deleteRow(row);
}
tableEl.reset();
tableEl.getComponent().setDirty(true);
}
} else if (source instanceof FormLink && source.getUserObject() instanceof RuleWrapper) {
RuleWrapper rule = (RuleWrapper) source.getUserObject();
String cmd = ((FormLink) source).getCmd();
if ("chooser".equals(cmd)) {
FormLink link = (FormLink) source;
openChooser(ureq, rule, link);
}
saveButton.getComponent().setDirty(false);
source.getComponent().setDirty(false);
tableEl.getComponent().setDirty(false);
flc.setDirty(false);
}
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 MembersTableController 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();
if ("vcard".equals(cmd)) {
MemberView row = membersModel.getObject(se.getIndex());
doOpenHomePage(row, ureq);
} else if ("email".equals(cmd)) {
MemberView row = membersModel.getObject(se.getIndex());
doSendEmailToMember(row, ureq);
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
MemberView row = (MemberView) link.getUserObject();
if ("im".equals(cmd)) {
doOpenChat(row, 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 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);
}
Aggregations