Search in sources :

Example 16 with Activateable2

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

the class BinderListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (newBinderDropdown == source) {
        doNewBinderCallout(ureq);
    } else if (newBinderFromCourseButton == source) {
        doNewBinderFromCourse(ureq);
    } else if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            if ("select".equals(cmd)) {
                BinderRow row = model.getObject(se.getIndex());
                Activateable2 activateable = doOpenBinder(ureq, row);
                if (activateable != null) {
                    activateable.activate(ureq, null, null);
                }
            }
        }
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("open".equals(cmd)) {
            BinderRow row = (BinderRow) link.getUserObject();
            Activateable2 activateable = doOpenBinder(ureq, row);
            if (activateable != null) {
                activateable.activate(ureq, null, null);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) BinderRow(org.olat.modules.portfolio.ui.model.BinderRow) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 17 with Activateable2

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

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 18 with Activateable2

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

the class UserInfoMainController method activate.

@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
    if (entries == null || entries.isEmpty())
        return;
    String type = entries.get(0).getOLATResourceable().getResourceableTypeName();
    if (StringHelper.containsNonWhitespace(type)) {
        Controller controller = createComponent(ureq, type);
        if (controller != null) {
            if (controller instanceof Activateable2) {
                List<ContextEntry> subEntries = entries.subList(1, entries.size());
                ((Activateable2) controller).activate(ureq, subEntries, entries.get(0).getTransientState());
            }
            main.setContent(controller.getInitialComponent());
            TreeNode selectedNode = TreeHelper.findNodeByUserObject(type, menuTree.getTreeModel().getRootNode());
            if (selectedNode != null) {
                menuTree.setSelectedNode(selectedNode);
            }
        }
    }
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) WeeklyCalendarController(org.olat.commons.calendar.ui.WeeklyCalendarController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) FolderRunController(org.olat.core.commons.modules.bc.FolderRunController) Controller(org.olat.core.gui.control.Controller) ContactFormController(org.olat.modules.co.ContactFormController) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController) EPMapRunController(org.olat.portfolio.ui.EPMapRunController) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 19 with Activateable2

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

the class AssessmentCourseTreeController method switchToBusinessGroupsView.

protected void switchToBusinessGroupsView(UserRequest ureq) {
    view = View.groups;
    TreeNode treeNode = menuTree.getSelectedNode();
    CourseNode courseNode = (CourseNode) treeNode.getUserObject();
    Controller ctrl = doSelectCourseNode(ureq, treeNode, courseNode);
    if (ctrl instanceof Activateable2) {
        ((Activateable2) ctrl).activate(ureq, null, null);
    }
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) TreeNode(org.olat.core.gui.components.tree.TreeNode) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) CourseNode(org.olat.course.nodes.CourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) BasicController(org.olat.core.gui.control.controller.BasicController)

Example 20 with Activateable2

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

the class AssessmentCourseTreeController method switchToUsersView.

/**
 * Switch to the user list
 *
 * @param ureq
 * @param stateOfUserList Optional
 */
protected void switchToUsersView(UserRequest ureq, StateEntry stateOfUserList) {
    view = View.users;
    TreeNode treeNode = menuTree.getSelectedNode();
    CourseNode courseNode = (CourseNode) treeNode.getUserObject();
    Controller ctrl = doSelectCourseNode(ureq, treeNode, courseNode);
    if (ctrl instanceof Activateable2) {
        ((Activateable2) ctrl).activate(ureq, null, stateOfUserList);
    }
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) TreeNode(org.olat.core.gui.components.tree.TreeNode) AssessableCourseNode(org.olat.course.nodes.AssessableCourseNode) CourseNode(org.olat.course.nodes.CourseNode) GTACourseNode(org.olat.course.nodes.GTACourseNode) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) BasicController(org.olat.core.gui.control.controller.BasicController)

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