Search in sources :

Example 11 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project OpenOLAT by OpenOLAT.

the class GoToMeetingController method doJoin.

private void doJoin(UserRequest ureq) {
    boolean join = false;
    GoToError error = new GoToError();
    if (registrant == null) {
        registrant = meetingMgr.registerTraining(meeting, getIdentity(), error);
    }
    if (registrant != null) {
        String joinUrl = registrant.getJoinUrl();
        if (joinUrl != null) {
            RedirectMediaResource redirect = new RedirectMediaResource(joinUrl);
            ureq.getDispatchResult().setResultingMediaResource(redirect);
            join = true;
        }
    }
    if (!join) {
        final String errorMessage;
        if (error.hasError()) {
            if (error.getError() != null) {
                errorMessage = translate(error.getError().i18nKey());
            } else {
                errorMessage = translate("error.code.unkown");
            }
        } else {
            errorMessage = translate("error.code.unkown");
        }
        ControllerCreator creator = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {

            @Override
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
                // Wrap in column layout, popup window needs a layout controller
                String title = "";
                String text = errorMessage;
                Controller ctr = MessageUIFactory.createErrorMessage(lureq, lwControl, title, text);
                LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, ctr);
                layoutCtr.addDisposableChildController(ctr);
                return layoutCtr;
            }
        });
        openInNewBrowserWindow(ureq, creator);
    }
    updateButtons();
}
Also used : GoToError(org.olat.modules.gotomeeting.model.GoToError) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) RedirectMediaResource(org.olat.core.gui.media.RedirectMediaResource) WindowControl(org.olat.core.gui.control.WindowControl) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Controller(org.olat.core.gui.control.Controller) BasicController(org.olat.core.gui.control.controller.BasicController) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Example 12 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project OpenOLAT by OpenOLAT.

the class IQManager method createLockedMessageController.

private GenericMainController createLockedMessageController(UserRequest ureq, WindowControl wControl, String fullName) {
    // wrap simple message into mainLayout
    GenericMainController glc = new GenericMainController(ureq, wControl) {

        @Override
        public void init(UserRequest uureq) {
            Panel empty = new Panel("empty");
            setTranslator(Util.createPackageTranslator(this.getClass(), uureq.getLocale()));
            Controller contentCtr = MessageUIFactory.createInfoMessage(uureq, getWindowControl(), translate("status.currently.locked.title"), translate("status.currently.locked", fullName));
            // auto dispose later
            listenTo(contentCtr);
            Component resComp = contentCtr.getInitialComponent();
            LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(uureq, getWindowControl(), empty, resComp, /*do not save no prefs*/
            null);
            // auto dispose later
            listenTo(columnLayoutCtr);
            putInitialPanel(columnLayoutCtr.getInitialComponent());
        }

        @Override
        protected Controller handleOwnMenuTreeEvent(Object uobject, UserRequest uureq) {
            // no menutree means no menu events.
            return null;
        }
    };
    glc.init(ureq);
    return glc;
}
Also used : Panel(org.olat.core.gui.components.panel.Panel) GenericMainController(org.olat.core.gui.control.generic.layout.GenericMainController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) GenericMainController(org.olat.core.gui.control.generic.layout.GenericMainController) IQEditController(org.olat.course.nodes.iq.IQEditController) OLATResourceableListeningWrapperController(org.olat.core.util.controller.OLATResourceableListeningWrapperController) MainLayoutController(org.olat.core.gui.control.generic.layout.MainLayoutController) Controller(org.olat.core.gui.control.Controller) Component(org.olat.core.gui.components.Component) UserRequest(org.olat.core.gui.UserRequest)

Example 13 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project OpenOLAT by OpenOLAT.

the class BusinessGroupMainRunController method getNoAccessMessage.

private Component getNoAccessMessage(UserRequest ureq, BusinessGroup group) {
    VelocityContainer vc = createVelocityContainer("access_denied");
    vc.contextPut("name", group.getName());
    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), null, vc, "grouprun");
    // cleanup on dispose
    listenTo(columnLayoutCtr);
    return columnLayoutCtr.getInitialComponent();
}
Also used : LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer)

Example 14 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project OpenOLAT by OpenOLAT.

the class TUEditController method event.

/**
 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 */
public void event(UserRequest ureq, Component source, Event event) {
    if (source == previewButton) {
        // those must be links
        Controller tunnelRunCtr;
        if (config.getBooleanSafe(TUConfigForm.CONFIG_IFRAME)) {
            tunnelRunCtr = new IframeTunnelController(ureq, getWindowControl(), config);
        } else {
            tunnelRunCtr = new TURunController(getWindowControl(), config, ureq, courseNode, PreviewConfigHelper.getPreviewCourseEnvironment(true, true, course));
        }
        if (previewLayoutCtr != null)
            previewLayoutCtr.dispose();
        // preview layout: only center column (col3) used
        previewLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), tunnelRunCtr);
        stackPanel.pushController(translate("preview"), previewLayoutCtr);
    }
}
Also used : LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ActivateableTabbableDefaultController(org.olat.core.gui.control.generic.tabbable.ActivateableTabbableDefaultController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) IframeTunnelController(org.olat.modules.tu.IframeTunnelController) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ConditionEditController(org.olat.course.condition.ConditionEditController) IframeTunnelController(org.olat.modules.tu.IframeTunnelController)

Example 15 with LayoutMain3ColsController

use of org.olat.core.commons.fullWebApp.LayoutMain3ColsController in project openolat by klemens.

the class GenericMainController method init.

/**
 * use after optional addChildNodeToAppend() or addChildNodeToPrepend() calls
 * to initialize MainController and set Panel
 *
 * @param ureq
 */
public void init(UserRequest ureq) {
    olatMenuTree = new MenuTree("olatMenuTree");
    TreeModel tm = buildTreeModel(ureq);
    olatMenuTree.setTreeModel(tm);
    content = new Panel("content");
    TreeNode firstNode = tm.getRootNode();
    TreeNode nodeToSelect = getLastDelegate(firstNode);
    olatMenuTree.setSelectedNodeId(nodeToSelect.getIdent());
    olatMenuTree.addListener(this);
    // default is to not display the root element and to let user open/close sub elements
    olatMenuTree.setRootVisible(false);
    olatMenuTree.setExpandSelectedNode(false);
    Object uobject = nodeToSelect.getUserObject();
    contentCtr = getContentCtr(uobject, ureq);
    // auto dispose later
    listenTo(contentCtr);
    Component resComp = contentCtr.getInitialComponent();
    content.setContent(resComp);
    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), olatMenuTree, content, className);
    // auto dispose later
    listenTo(columnLayoutCtr);
    // create the stack
    stackVC = new BreadcrumbedStackedPanel("genericStack", getTranslator(), this);
    stackVC.pushController("content", columnLayoutCtr);
    putInitialPanel(stackVC);
}
Also used : MenuTree(org.olat.core.gui.components.tree.MenuTree) TreeModel(org.olat.core.gui.components.tree.TreeModel) GenericTreeModel(org.olat.core.gui.components.tree.GenericTreeModel) BreadcrumbPanel(org.olat.core.gui.components.stack.BreadcrumbPanel) Panel(org.olat.core.gui.components.panel.Panel) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel) GenericTreeNode(org.olat.core.gui.components.tree.GenericTreeNode) TreeNode(org.olat.core.gui.components.tree.TreeNode) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) Component(org.olat.core.gui.components.Component) BreadcrumbedStackedPanel(org.olat.core.gui.components.stack.BreadcrumbedStackedPanel)

Aggregations

LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)80 WindowControl (org.olat.core.gui.control.WindowControl)38 Controller (org.olat.core.gui.control.Controller)36 UserRequest (org.olat.core.gui.UserRequest)34 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)28 Panel (org.olat.core.gui.components.panel.Panel)12 BasicController (org.olat.core.gui.control.controller.BasicController)12 RepositoryEntry (org.olat.repository.RepositoryEntry)12 MainLayoutController (org.olat.core.gui.control.generic.layout.MainLayoutController)10 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)10 VelocityContainer (org.olat.core.gui.components.velocity.VelocityContainer)8 OLATResourceable (org.olat.core.id.OLATResourceable)8 ContextEntry (org.olat.core.id.context.ContextEntry)8 AssertException (org.olat.core.logging.AssertException)8 ICourse (org.olat.course.ICourse)8 GlossaryMainController (org.olat.core.commons.modules.glossary.GlossaryMainController)6 Component (org.olat.core.gui.components.Component)6 TooledStackedPanel (org.olat.core.gui.components.stack.TooledStackedPanel)6 CloneController (org.olat.core.gui.control.generic.clone.CloneController)6 CertificateAndEfficiencyStatementController (org.olat.course.certificate.ui.CertificateAndEfficiencyStatementController)6