use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableRenderEvent in project OpenOLAT by OpenOLAT.
the class BinderPageListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof FlexiTableRenderEvent) {
FlexiTableRenderEvent re = (FlexiTableRenderEvent) event;
if (re.getRendererType() == FlexiTableRendererType.custom) {
tableEl.sort(new SortKey(null, false));
}
} else if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select-page".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPendingAssignment()) {
doStartAssignment(ureq, row);
} else {
doOpenRow(ureq, row, false);
}
}
}
} else if (previousSectionLink == source) {
Section previousSection = (Section) previousSectionLink.getUserObject();
doFilterSection(previousSection);
} else if (nextSectionLink == source) {
Section nextSection = (Section) nextSectionLink.getUserObject();
doFilterSection(nextSection);
} else if (showAllSectionsLink == source) {
doShowAll();
} else if (newSectionButton == source) {
doCreateNewSection(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("new.entry".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doCreateNewPage(ureq, row.getSection());
} else if ("new.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doCreateNewAssignment(ureq, row.getSection());
}
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableRenderEvent in project OpenOLAT by OpenOLAT.
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.FlexiTableRenderEvent 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.FlexiTableRenderEvent in project OpenOLAT by OpenOLAT.
the class DeletedBinderController 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 ("restore".equals(cmd)) {
BinderRow row = model.getObject(se.getIndex());
doConfirmRestoreBinder(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.FlexiTableRenderEvent in project openolat by klemens.
the class BinderPageListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (tableEl == source) {
if (event instanceof FlexiTableRenderEvent) {
FlexiTableRenderEvent re = (FlexiTableRenderEvent) event;
if (re.getRendererType() == FlexiTableRendererType.custom) {
tableEl.sort(new SortKey(null, false));
}
} else if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("select-page".equals(cmd)) {
PortfolioElementRow row = model.getObject(se.getIndex());
if (row.isPendingAssignment()) {
doStartAssignment(ureq, row);
} else {
doOpenRow(ureq, row, false);
}
}
}
} else if (previousSectionLink == source) {
Section previousSection = (Section) previousSectionLink.getUserObject();
doFilterSection(previousSection);
} else if (nextSectionLink == source) {
Section nextSection = (Section) nextSectionLink.getUserObject();
doFilterSection(nextSection);
} else if (showAllSectionsLink == source) {
doShowAll();
} else if (newSectionButton == source) {
doCreateNewSection(ureq);
} else if (source instanceof FormLink) {
FormLink link = (FormLink) source;
String cmd = link.getCmd();
if ("new.entry".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doCreateNewPage(ureq, row.getSection());
} else if ("new.assignment".equals(cmd)) {
PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
doCreateNewAssignment(ureq, row.getSection());
}
}
super.formInnerEvent(ureq, source, event);
}
Aggregations