use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class QTI21StatisticsToolController method doSelectNode.
private void doSelectNode(UserRequest ureq, TreeNode selectedNode) {
removeAsListenerAndDispose(currentCtrl);
WindowControl swControl = addToHistory(ureq, OresHelper.createOLATResourceableInstance(selectedNode.getIdent(), 0l), null);
currentCtrl = result.getController(ureq, swControl, stackPanel, selectedNode);
if (currentCtrl != null) {
listenTo(currentCtrl);
layoutCtr.setCol3(currentCtrl.getInitialComponent());
} else {
layoutCtr.setCol3(new Panel("empty"));
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class PaypalAdminController method doOpenMasterAccountSettings.
private void doOpenMasterAccountSettings(UserRequest ureq) {
if (accountController == null) {
OLATResourceable ores = OresHelper.createOLATResourceableInstance("transactions", 0l);
WindowControl bwControl = addToHistory(ureq, ores, null);
accountController = new PaypalMasterAccountController(ureq, bwControl);
listenTo(accountController);
} else {
addToHistory(ureq, accountController);
}
mainVC.put("segmentCmp", accountController.getInitialComponent());
OLATResourceable ores = OresHelper.createOLATResourceableInstance("configuration", 0l);
addToHistory(ureq, ores, null);
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class OrdersAdminController method doSelectOrder.
protected void doSelectOrder(UserRequest ureq, OrderTableItem order) {
removeAsListenerAndDispose(detailController);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(Order.class, order.getOrderKey());
WindowControl bwControl = addToHistory(ureq, ores, null);
detailController = new OrderDetailController(ureq, bwControl, order.getOrderKey());
listenTo(detailController);
if (stackPanel == null) {
mainPanel.setContent(detailController.getInitialComponent());
} else {
detailController.hideBackLink();
stackPanel.pushController(order.getOrderNr(), detailController);
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class SPRunController method doInlineIntegration.
private void doInlineIntegration(UserRequest ureq, boolean hasEditRightsTo) {
boolean allowRelativeLinks = config.getBooleanSafe(SPEditController.CONFIG_KEY_ALLOW_RELATIVE_LINKS);
// create the possibility to float
OLATResourceable ores = OresHelper.createOLATResourceableInstance(ICourse.class, userCourseEnv.getCourseEnvironment().getCourseResourceableId());
DeliveryOptions deliveryOptions = (DeliveryOptions) config.get(SPEditController.CONFIG_KEY_DELIVERYOPTIONS);
spCtr = new SinglePageController(ureq, getWindowControl(), courseFolderContainer, fileName, allowRelativeLinks, null, ores, deliveryOptions, userCourseEnv.getCourseEnvironment().isPreview());
spCtr.setAllowDownload(true);
// only for inline integration: register for controller event to forward a olatcmd to the course,
// and also to remember latest position in the script
listenTo(spCtr);
// enable edit mode if user has the according rights
if (hasEditRightsTo) {
spCtr.allowPageEditing();
// set the link tree model to internal for the HTML editor
if (linkTreeModel != null) {
spCtr.setInternalLinkTreeModel(linkTreeModel);
}
}
// create clone wrapper layout
CloneLayoutControllerCreatorCallback clccc = new CloneLayoutControllerCreatorCallback() {
public ControllerCreator createLayoutControllerCreator(UserRequest uureq, final ControllerCreator contentControllerCreator) {
return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(uureq, new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
// Wrap in column layout, popup window needs a layout controller
Controller ctr = contentControllerCreator.createController(lureq, lwControl);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, ctr);
layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), userCourseEnv.getCourseEnvironment()));
// Controller titledCtrl = TitledWrapperHelper.getWrapper(lureq, lwControl, ctr, courseNode, "o_sp_icon");
layoutCtr.addDisposableChildController(ctr);
return layoutCtr;
}
});
}
};
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, getWindowControl(), spCtr, courseNode, "o_sp_icon");
if (ctrl instanceof CloneableController) {
cloneC = new CloneController(ureq, getWindowControl(), (CloneableController) ctrl, clccc);
listenTo(cloneC);
main.setContent(cloneC.getInitialComponent());
} else {
throw new AssertException("Controller must be cloneable");
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class ForumController method doUserMessageList.
private void doUserMessageList(UserRequest ureq, Long identityKey) {
cleanUpMessageViews();
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Identity", identityKey);
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
userViewCtrl = new MessageListController(ureq, bwControl, forum, focallback);
Identity user = securityManager.loadIdentityByKey(identityKey);
userViewCtrl.loadUserMessages(ureq, user);
listenTo(userViewCtrl);
putContent(userViewCtrl);
addToHistory(ureq, userViewCtrl);
}
Aggregations