Search in sources :

Example 6 with GenericMainController

use of org.olat.core.gui.control.generic.layout.GenericMainController in project openolat by klemens.

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)

Aggregations

LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)6 GenericMainController (org.olat.core.gui.control.generic.layout.GenericMainController)6 UserRequest (org.olat.core.gui.UserRequest)4 Component (org.olat.core.gui.components.Component)4 Panel (org.olat.core.gui.components.panel.Panel)4 Controller (org.olat.core.gui.control.Controller)4 MainLayoutController (org.olat.core.gui.control.generic.layout.MainLayoutController)4 OLATResourceableListeningWrapperController (org.olat.core.util.controller.OLATResourceableListeningWrapperController)4 IQEditController (org.olat.course.nodes.iq.IQEditController)4 MessageController (org.olat.core.gui.control.generic.messages.MessageController)2 LockResult (org.olat.core.util.coordinate.LockResult)2 RepositoryModule (org.olat.repository.RepositoryModule)2