use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent 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.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class PaypalTransactionsController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == backLink) {
if (detailsController != null) {
flc.remove(detailsController.getInitialComponent());
removeAsListenerAndDispose(detailsController);
}
addSearchToHistory(ureq);
} else if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
PaypalTransaction row = dataModel.getObject(se.getIndex());
if (CMD_SELECT.equals(se.getCommand())) {
doSelectTransaction(ureq, row);
}
} else if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
doSearch(ureq, 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 AbstractBusinessGroupListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (createButton == source) {
doCreate(ureq, getWindowControl(), null);
} else if (deleteButton == source) {
confirmDelete(ureq, getSelectedItems());
} else if (duplicateButton == source) {
doCopy(ureq, getSelectedItems());
} else if (configButton == source) {
doConfiguration(ureq, getSelectedItems());
} else if (emailButton == source) {
doEmails(ureq, getSelectedItems());
} else if (usersButton == source) {
doUserManagement(ureq, getSelectedItems());
} else if (mergeButton == source) {
doMerge(ureq, getSelectedItems());
} else if (selectButton == source) {
doSelect(ureq, getSelectedItems());
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("mark".equals(cmd)) {
BusinessGroupRow row = (BusinessGroupRow) link.getUserObject();
boolean marked = toogleMark(row);
link.setIconLeftCSS(marked ? "o_icon o_icon_bookmark o_icon-lg" : "o_icon o_icon_bookmark_add o_icon-lg");
link.getComponent().setDirty(true);
} else if ("allresources".equals(cmd)) {
BusinessGroupShort bg = (BusinessGroupShort) link.getUserObject();
NewControllerFactory.getInstance().launch("[BusinessGroup:" + bg.getKey() + "][toolresources:0]", ureq, getWindowControl());
} else if ("resource".equals(cmd)) {
RepositoryEntryShort re = (RepositoryEntryShort) link.getUserObject();
NewControllerFactory.getInstance().launch("[RepositoryEntry:" + re.getKey() + "]", ureq, getWindowControl());
} else if (link.getUserObject() instanceof BusinessGroupRef) {
BusinessGroupRef item = (BusinessGroupRef) link.getUserObject();
Long businessGroupKey = item.getKey();
BusinessGroup businessGroup = businessGroupService.loadBusinessGroup(businessGroupKey);
if (businessGroup == null) {
groupTableModel.removeBusinessGroup(businessGroupKey);
tableEl.reset();
} else if (TABLE_ACTION_ACCESS.equals(cmd)) {
doAccess(ureq, businessGroup);
} else if (TABLE_ACTION_LEAVE.equals(cmd)) {
doConfirmLeaving(ureq, businessGroup);
}
}
} else if (source == tableEl) {
String cmd = event.getCommand();
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
if (se.getIndex() >= 0 && se.getIndex() < groupTableModel.getRowCount()) {
BusinessGroupRef item = groupTableModel.getObject(se.getIndex());
Long businessGroupKey = item.getKey();
BusinessGroup businessGroup = businessGroupService.loadBusinessGroup(businessGroupKey);
// prevent rs after a group is deleted by someone else
if (businessGroup == null) {
groupTableModel.removeBusinessGroup(businessGroupKey);
tableEl.reset();
} else if (TABLE_ACTION_LAUNCH.equals(cmd)) {
doLaunch(ureq, businessGroup);
} else if (TABLE_ACTION_DELETE.equals(cmd)) {
confirmDelete(ureq, Collections.singletonList(item));
} else if (TABLE_ACTION_LAUNCH.equals(cmd)) {
doLaunch(ureq, businessGroup);
} else if (TABLE_ACTION_EDIT.equals(cmd)) {
doEdit(ureq, businessGroup);
} else if (TABLE_ACTION_LEAVE.equals(cmd)) {
doConfirmLeaving(ureq, businessGroup);
} else if (TABLE_ACTION_ACCESS.equals(cmd)) {
doAccess(ureq, businessGroup);
} else if (TABLE_ACTION_SELECT.equals(cmd)) {
doSelect(ureq, businessGroup);
}
}
} else if (event instanceof FlexiTableSearchEvent) {
doSearch((FlexiTableSearchEvent) event);
}
}
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 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.FlexiTableSearchEvent in project OpenOLAT by OpenOLAT.
the class SharedPagesController 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();
SharedPageRow row = model.getObject(se.getIndex());
if ("select".equals(cmd)) {
Activateable2 activeateable = doSelectedPage(ureq, row);
if (activeateable != null) {
activeateable.activate(ureq, null, null);
}
}
} else if (event instanceof FlexiTableSearchEvent) {
FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
if (FlexiTableSearchEvent.QUICK_SEARCH.equals(se.getCommand()) || FormEvent.RESET.getCommand().equals(se.getCommand())) {
loadModel(true, true);
}
}
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
if ("mark".equals(link.getCmd())) {
SharedPageRow row = (SharedPageRow) link.getUserObject();
toggleBookmark(row);
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations