Search in sources :

Example 1 with BreadcrumbPanelAware

use of org.olat.core.gui.components.stack.BreadcrumbPanelAware in project OpenOLAT by OpenOLAT.

the class GenericMainController method createController.

/**
 * creates Controller for clicked Node, default implementation.
 *
 * @param ae
 * @param ureq
 * @return corresponding controller
 */
protected Controller createController(ActionExtension ae, UserRequest ureq) {
    // default implementation for simple case where action extension.
    WindowControl bwControl = getWindowControl();
    if (olatMenuTree.getTreeModel() instanceof GenericTreeModel) {
        if (ae instanceof Extension) {
            Extension nE = (Extension) ae;
            // get our ores for the extension
            OLATResourceable ores;
            if (ae instanceof GenericActionExtension && StringHelper.containsNonWhitespace(((GenericActionExtension) ae).getNavigationKey())) {
                // there is a navigation-key, use the nice way
                ores = OresHelper.createOLATResourceableInstance(((GenericActionExtension) ae).getNavigationKey(), 0L);
            } else {
                ores = OresHelper.createOLATResourceableInstance(GMCMT, CodeHelper.getUniqueIDFromString(nE.getUniqueExtensionID()));
            }
            ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
            bwControl = addToHistory(ureq, ores, null);
        }
    }
    Controller ctrl = ae.createController(ureq, bwControl, null);
    if (ctrl instanceof BreadcrumbPanelAware) {
        ((BreadcrumbPanelAware) ctrl).setBreadcrumbPanel(stackVC);
    }
    return ctrl;
}
Also used : Extension(org.olat.core.extensions.Extension) ActionExtension(org.olat.core.extensions.action.ActionExtension) GenericActionExtension(org.olat.core.extensions.action.GenericActionExtension) BreadcrumbPanelAware(org.olat.core.gui.components.stack.BreadcrumbPanelAware) OLATResourceable(org.olat.core.id.OLATResourceable) GenericTreeModel(org.olat.core.gui.components.tree.GenericTreeModel) GenericActionExtension(org.olat.core.extensions.action.GenericActionExtension) WindowControl(org.olat.core.gui.control.WindowControl) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController)

Example 2 with BreadcrumbPanelAware

use of org.olat.core.gui.components.stack.BreadcrumbPanelAware in project OpenOLAT by OpenOLAT.

the class HomeMainController method createController.

protected Controller createController(GenericActionExtension ae, UserRequest ureq) {
    WindowControl bwControl = getWindowControl();
    // get our ores for the extension
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(ae.getNavigationKey(), 0L);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    bwControl = addToHistory(ureq, ores, null);
    Controller ctrl = ae.createController(ureq, bwControl, null);
    if (ctrl instanceof BreadcrumbPanelAware) {
        ((BreadcrumbPanelAware) ctrl).setBreadcrumbPanel(stackPanel);
    }
    return ctrl;
}
Also used : BreadcrumbPanelAware(org.olat.core.gui.components.stack.BreadcrumbPanelAware) 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) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController)

Example 3 with BreadcrumbPanelAware

use of org.olat.core.gui.components.stack.BreadcrumbPanelAware in project openolat by klemens.

the class GenericMainController method createController.

/**
 * creates Controller for clicked Node, default implementation.
 *
 * @param ae
 * @param ureq
 * @return corresponding controller
 */
protected Controller createController(ActionExtension ae, UserRequest ureq) {
    // default implementation for simple case where action extension.
    WindowControl bwControl = getWindowControl();
    if (olatMenuTree.getTreeModel() instanceof GenericTreeModel) {
        if (ae instanceof Extension) {
            Extension nE = (Extension) ae;
            // get our ores for the extension
            OLATResourceable ores;
            if (ae instanceof GenericActionExtension && StringHelper.containsNonWhitespace(((GenericActionExtension) ae).getNavigationKey())) {
                // there is a navigation-key, use the nice way
                ores = OresHelper.createOLATResourceableInstance(((GenericActionExtension) ae).getNavigationKey(), 0L);
            } else {
                ores = OresHelper.createOLATResourceableInstance(GMCMT, CodeHelper.getUniqueIDFromString(nE.getUniqueExtensionID()));
            }
            ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
            bwControl = addToHistory(ureq, ores, null);
        }
    }
    Controller ctrl = ae.createController(ureq, bwControl, null);
    if (ctrl instanceof BreadcrumbPanelAware) {
        ((BreadcrumbPanelAware) ctrl).setBreadcrumbPanel(stackVC);
    }
    return ctrl;
}
Also used : Extension(org.olat.core.extensions.Extension) ActionExtension(org.olat.core.extensions.action.ActionExtension) GenericActionExtension(org.olat.core.extensions.action.GenericActionExtension) BreadcrumbPanelAware(org.olat.core.gui.components.stack.BreadcrumbPanelAware) OLATResourceable(org.olat.core.id.OLATResourceable) GenericTreeModel(org.olat.core.gui.components.tree.GenericTreeModel) GenericActionExtension(org.olat.core.extensions.action.GenericActionExtension) WindowControl(org.olat.core.gui.control.WindowControl) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) MainLayoutBasicController(org.olat.core.gui.control.controller.MainLayoutBasicController)

Example 4 with BreadcrumbPanelAware

use of org.olat.core.gui.components.stack.BreadcrumbPanelAware in project openolat by klemens.

the class HomeMainController method createController.

protected Controller createController(GenericActionExtension ae, UserRequest ureq) {
    WindowControl bwControl = getWindowControl();
    // get our ores for the extension
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(ae.getNavigationKey(), 0L);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    bwControl = addToHistory(ureq, ores, null);
    Controller ctrl = ae.createController(ureq, bwControl, null);
    if (ctrl instanceof BreadcrumbPanelAware) {
        ((BreadcrumbPanelAware) ctrl).setBreadcrumbPanel(stackPanel);
    }
    return ctrl;
}
Also used : BreadcrumbPanelAware(org.olat.core.gui.components.stack.BreadcrumbPanelAware) 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) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController)

Aggregations

LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)4 BreadcrumbPanelAware (org.olat.core.gui.components.stack.BreadcrumbPanelAware)4 Controller (org.olat.core.gui.control.Controller)4 WindowControl (org.olat.core.gui.control.WindowControl)4 MainLayoutBasicController (org.olat.core.gui.control.controller.MainLayoutBasicController)4 OLATResourceable (org.olat.core.id.OLATResourceable)4 Extension (org.olat.core.extensions.Extension)2 ActionExtension (org.olat.core.extensions.action.ActionExtension)2 GenericActionExtension (org.olat.core.extensions.action.GenericActionExtension)2 GenericTreeModel (org.olat.core.gui.components.tree.GenericTreeModel)2