Search in sources :

Example 1 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class BinderRuntimeController method doMembers.

@Override
protected Activateable2 doMembers(UserRequest ureq) {
    Activateable2 controller = super.doMembers(ureq);
    enableRuntimeNavBar(false);
    return controller;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2)

Example 2 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class MembersManagementMainController method activate.

@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
    if (entries == null || entries.isEmpty())
        return;
    ContextEntry currentEntry = entries.get(0);
    String cmd = currentEntry.getOLATResourceable().getResourceableTypeName();
    Controller selectedCtrl = selectMenuItem(ureq, cmd);
    if (selectedCtrl instanceof Activateable2) {
        List<ContextEntry> subEntries = entries.subList(1, entries.size());
        ((Activateable2) selectedCtrl).activate(ureq, subEntries, currentEntry.getTransientState());
    }
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) GroupsAndRightsController(org.olat.course.groupsandrights.GroupsAndRightsController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController) OrdersAdminController(org.olat.resource.accesscontrol.ui.OrdersAdminController) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 3 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class AssessmentToolController method doSelectUsersView.

private Controller doSelectUsersView(UserRequest ureq, String resName, AssessedIdentityListState state) {
    if (currentCtl != null) {
        stackPanel.popController(currentCtl);
    }
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(resName, 0l);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
    addToHistory(ureq, bwControl);
    Controller treeCtrl = element.createIdentityList(ureq, bwControl, stackPanel, testEntry, assessmentCallback);
    listenTo(treeCtrl);
    stackPanel.pushController(translate("users"), treeCtrl);
    currentCtl = treeCtrl;
    if (treeCtrl instanceof Activateable2) {
        ((Activateable2) treeCtrl).activate(ureq, null, state);
    }
    return currentCtl;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController)

Example 4 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class MediaCenterController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            MediaRow row = model.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                if (select) {
                    doSelect(ureq, row.getKey());
                } else {
                    Activateable2 activateable = doOpenMedia(ureq, row.getKey());
                    if (activateable != null) {
                        activateable.activate(ureq, null, null);
                    }
                }
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            loadModel();
        }
    } else if (newMediaCallout == source) {
        doOpenNewMediaCallout(ureq, newMediaCallout);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("select".equals(cmd)) {
            MediaRow row = (MediaRow) link.getUserObject();
            if (select) {
                doSelect(ureq, row.getKey());
            } else {
                Activateable2 activateable = doOpenMedia(ureq, row.getKey());
                if (activateable != null) {
                    activateable.activate(ureq, null, null);
                }
            }
        } else if ("tag".equals(cmd)) {
            doToggleCategory(link);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) MediaSelectionEvent(org.olat.modules.portfolio.ui.event.MediaSelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink) MediaRow(org.olat.modules.portfolio.ui.model.MediaRow)

Example 5 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project OpenOLAT by OpenOLAT.

the class MySharedItemsController 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();
            MySharedItemRow row = model.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                Activateable2 activateable = doSelectBinder(ureq, row);
                if (activateable != null) {
                    activateable.activate(ureq, null, null);
                }
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
            loadModel(se.getSearch());
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : MySharedItemRow(org.olat.modules.portfolio.model.MySharedItemRow) Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)

Aggregations

Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)78 ContextEntry (org.olat.core.id.context.ContextEntry)44 Controller (org.olat.core.gui.control.Controller)28 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)22 TreeNode (org.olat.core.gui.components.tree.TreeNode)16 WindowControl (org.olat.core.gui.control.WindowControl)16 BasicController (org.olat.core.gui.control.controller.BasicController)14 CourseNode (org.olat.course.nodes.CourseNode)12 CollaborationTools (org.olat.collaboration.CollaborationTools)10 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)10 MainLayoutBasicController (org.olat.core.gui.control.controller.MainLayoutBasicController)10 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)10 GTACourseNode (org.olat.course.nodes.GTACourseNode)10 FlexiTableSearchEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)8 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)8 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)6 ChiefController (org.olat.core.gui.control.ChiefController)6 VetoableCloseController (org.olat.core.gui.control.VetoableCloseController)6 BornSiteInstance (org.olat.core.gui.control.navigation.BornSiteInstance)6 OLATResourceable (org.olat.core.id.OLATResourceable)5