// open a controller in a new window which only results in sending back
// javascript
// get preselected groups
final String groups = (String) moduleConfiguration.get(CONFIG_KEY_EMAILTOGROUPS);
// get group select controller
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
selectGroupsCtr = new GroupAndAreaSelectController(lureq,lwControl,course.getCourseEnvironment().getCourseGroupManager(),
GroupAndAreaSelectController.TYPE_GROUP, groups,
FormRenderer.JSELEMENTID + "popupchoosegroups"+configForm.hashCode());
// use a one-column main layout
// disposed in dispose method of COEditController!
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, selectGroupsCtr.getInitialComponent(), "null");
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);
//
} else if (event.getCommand().equals("popupchooseareas")) {
// open a controller in a new window which only results in sending back
// javascript
// get preselected areas
final String areas = (String) moduleConfiguration.get(CONFIG_KEY_EMAILTOAREAS);
// get area select controller
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
selectAreasCtr = new GroupAndAreaSelectController(lureq, lwControl, course.getCourseEnvironment().getCourseGroupManager(),
GroupAndAreaSelectController.TYPE_AREA, areas, FormRenderer.JSELEMENTID + "popupchooseareas" + configForm.hashCode());
// use a one-column main layout
// disposed in dispose method of COEditController!
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, selectAreasCtr.getInitialComponent(), null);
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);
//
}