Search in sources :

Example 16 with WindowControl

use of org.olat.core.gui.control.WindowControl 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 17 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class CourseListController method selectCourse.

private void selectCourse(UserRequest ureq, CourseStatEntry courseStat) {
    removeAsListenerAndDispose(courseCtrl);
    courseCtrl = null;
    RepositoryEntry re = repositoryManager.lookupRepositoryEntry(courseStat.getRepoKey(), false);
    if (re != null) {
        OLATResourceable ores = OresHelper.createOLATResourceableInstance(RepositoryEntry.class, re.getKey());
        WindowControl bwControl = addToHistory(ureq, ores, null);
        int index = tableCtr.getIndexOfSortedObject(courseStat);
        courseCtrl = new CourseController(ureq, bwControl, stackPanel, re, courseStat, index, tableCtr.getRowCount());
        listenTo(courseCtrl);
        stackPanel.popUpToRootController(ureq);
        stackPanel.pushController(re.getDisplayname(), courseCtrl);
    }
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) RepositoryEntry(org.olat.repository.RepositoryEntry) WindowControl(org.olat.core.gui.control.WindowControl)

Example 18 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class GroupListController method selectGroup.

protected void selectGroup(UserRequest ureq, GroupStatEntry groupStatistic) {
    removeAsListenerAndDispose(groupCtrl);
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(BusinessGroup.class, groupStatistic.getGroupKey());
    WindowControl bwControl = addToHistory(ureq, ores, null);
    int index = tableCtr.getIndexOfSortedObject(groupStatistic);
    groupCtrl = new GroupController(ureq, bwControl, stackPanel, groupStatistic, index, tableCtr.getRowCount());
    listenTo(groupCtrl);
    stackPanel.popUpToRootController(ureq);
    stackPanel.pushController(groupStatistic.getGroupName(), groupCtrl);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 19 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class LectureRepositoryAdminController method doOpenParticipants.

private void doOpenParticipants(UserRequest ureq) {
    if (participantsCtrl == null) {
        OLATResourceable ores = OresHelper.createOLATResourceableType("Participants");
        WindowControl swControl = addToHistory(ureq, ores, null);
        participantsCtrl = new ParticipantListRepositoryController(ureq, swControl, entry, false, true);
        listenTo(participantsCtrl);
    } else {
        addToHistory(ureq, participantsCtrl);
    }
    mainVC.put("segmentCmp", participantsCtrl.getInitialComponent());
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 20 with WindowControl

use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.

the class NotesPortletRunController method event.

/**
 * @see org.olat.core.gui.control.ControllerEventListener#dispatchEvent(org.olat.core.gui.UserRequest, org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
 */
public void event(UserRequest ureq, Controller source, Event event) {
    super.event(ureq, source, event);
    if (source == tableCtr) {
        if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
            TableEvent te = (TableEvent) event;
            String actionid = te.getActionId();
            if (actionid.equals(CMD_LAUNCH)) {
                int rowid = te.getRowId();
                final NotePortletEntry pe = (NotePortletEntry) notesListModel.getObject(rowid);
                final Note note = pe.getValue();
                // will not be disposed on course run dispose, popus up as new browserwindow
                ControllerCreator ctrlCreator = new ControllerCreator() {

                    public Controller createController(UserRequest lureq, WindowControl lwControl) {
                        Controller nc = new NoteController(lureq, lwControl, note);
                        // use on column layout
                        LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, nc);
                        // dispose content on layout dispose
                        layoutCtr.addDisposableChildController(nc);
                        return layoutCtr;
                    }
                };
                // wrap the content controller into a full header layout
                ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
                // open in new browser window
                PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
                pbw.open(ureq);
            // 
            }
        }
    }
}
Also used : TableEvent(org.olat.core.gui.components.table.TableEvent) PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) WindowControl(org.olat.core.gui.control.WindowControl) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) AbstractPortletRunController(org.olat.core.gui.control.generic.portal.AbstractPortletRunController) Controller(org.olat.core.gui.control.Controller) TableController(org.olat.core.gui.components.table.TableController) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)628 OLATResourceable (org.olat.core.id.OLATResourceable)300 UserRequest (org.olat.core.gui.UserRequest)136 Controller (org.olat.core.gui.control.Controller)70 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)68 RepositoryEntry (org.olat.repository.RepositoryEntry)68 StepsMainRunController (org.olat.core.gui.control.generic.wizard.StepsMainRunController)64 ContextEntry (org.olat.core.id.context.ContextEntry)58 Step (org.olat.core.gui.control.generic.wizard.Step)56 StepRunnerCallback (org.olat.core.gui.control.generic.wizard.StepRunnerCallback)56 StepsRunContext (org.olat.core.gui.control.generic.wizard.StepsRunContext)56 BusinessControl (org.olat.core.id.context.BusinessControl)56 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)46 ArrayList (java.util.ArrayList)42 Identity (org.olat.core.id.Identity)38 StateSite (org.olat.core.id.context.StateSite)32 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)28 AssertException (org.olat.core.logging.AssertException)24 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)22 List (java.util.List)20