Search in sources :

Example 6 with FlexiTableRenderEvent

use of org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableRenderEvent in project openolat by klemens.

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);
}
Also used : BinderRow(org.olat.modules.portfolio.ui.model.BinderRow) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableRenderEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableRenderEvent)

Aggregations

FlexiTableRenderEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableRenderEvent)6 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)6 PortfolioElementRow (org.olat.modules.portfolio.ui.model.PortfolioElementRow)4 SortKey (org.olat.core.commons.persistence.SortKey)2 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)2 AssessmentSection (org.olat.modules.portfolio.AssessmentSection)2 Section (org.olat.modules.portfolio.Section)2 BinderRow (org.olat.modules.portfolio.ui.model.BinderRow)2