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;
}
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);
}
}
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);
}
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());
}
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);
//
}
}
}
}
Aggregations