use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project OpenOLAT by OpenOLAT.
the class EPAddArtefactController method prepareFileArtefactWizzard.
/**
* prepare a file artefact and open with wizzard initialized with a special
* first step for file-artefacts
*
* @param ureq
*/
private void prepareFileArtefactWizzard(UserRequest ureq) {
EPArtefactHandler<?> artHandler = portfolioModule.getArtefactHandler(FileArtefact.FILE_ARTEFACT_TYPE);
AbstractArtefact artefact1 = artHandler.createArtefact();
artefact1.setAuthor(getIdentity());
artefact1.setSource(translate("file.artefact.source.info"));
artefact1.setCollectionDate(new Date());
artefact1.setSignature(-30);
vfsTemp = ePFMgr.getArtefactsTempContainer(getIdentity());
Step start = new EPCreateFileArtefactStep00(ureq, artefact1, preSelectedStruct, vfsTemp);
StepRunnerCallback finish = new EPArtefactWizzardStepCallback(vfsTemp);
collectStepsCtrl = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("create.file.artefact.wizzard.title"), "o_sel_artefact_add_wizard o_sel_artefact_add_file_wizard");
listenTo(collectStepsCtrl);
getWindowControl().pushAsModalDialog(collectStepsCtrl.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project OpenOLAT by OpenOLAT.
the class RepositoryMembersController method doChooseMembers.
private void doChooseMembers(UserRequest ureq) {
removeAsListenerAndDispose(importMembersWizard);
Step start = new ImportMember_1b_ChooseMemberStep(ureq, repoEntry, null, false);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest uureq, WindowControl wControl, StepsRunContext runContext) {
addMembers(uureq, runContext);
return StepsMainRunController.DONE_MODIFIED;
}
};
importMembersWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("add.member"), "o_sel_group_import_1_wizard");
listenTo(importMembersWizard);
getWindowControl().pushAsModalDialog(importMembersWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project OpenOLAT by OpenOLAT.
the class GroupController method doImportUsers.
private void doImportUsers(UserRequest ureq) {
removeAsListenerAndDispose(userToGroupWizard);
Step start = new UsersToGroupWizardStep00(ureq, addUserMailDefaultTempl, mandatoryEmail);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest uureq, WindowControl wControl, StepsRunContext runContext) {
@SuppressWarnings("unchecked") List<Identity> choosenIdentities = (List<Identity>) runContext.get("members");
MailTemplate customTemplate = (MailTemplate) runContext.get("mailTemplate");
if (choosenIdentities == null || choosenIdentities.size() == 0) {
showError("msg.selectionempty");
} else {
doAddIdentitiesToGroup(uureq, choosenIdentities, customTemplate);
}
return StepsMainRunController.DONE_MODIFIED;
}
};
userToGroupWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("overview.addusers"), "o_sel_secgroup_import_logins_wizard");
listenTo(userToGroupWizard);
getWindowControl().pushAsModalDialog(userToGroupWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project OpenOLAT by OpenOLAT.
the class EditorMainController method launchChecklistsWizard.
private void launchChecklistsWizard(UserRequest ureq) {
removeAsListenerAndDispose(checklistWizard);
Step start = new CheckList_1_CheckboxStep(ureq, ores);
StepRunnerCallback finish = new CheckListStepRunnerCallback(ores);
checklistWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("checklist.wizard"), "o_sel_checklist_wizard", "Assessment#_checklist_multiple");
listenTo(checklistWizard);
getWindowControl().pushAsModalDialog(checklistWizard.getInitialComponent());
}
use of org.olat.core.gui.control.generic.wizard.StepRunnerCallback in project OpenOLAT by OpenOLAT.
the class GroupController method doImportUsers.
private void doImportUsers(UserRequest ureq) {
removeAsListenerAndDispose(userToGroupWizard);
Step start = new UsersToGroupWizardStep00(ureq, addUserMailDefaultTempl, mandatoryEmail);
StepRunnerCallback finish = new StepRunnerCallback() {
@Override
public Step execute(UserRequest ureq, WindowControl wControl, StepsRunContext runContext) {
@SuppressWarnings("unchecked") List<Identity> choosenIdentities = (List<Identity>) runContext.get("members");
MailTemplate customTemplate = (MailTemplate) runContext.get("mailTemplate");
if (choosenIdentities == null || choosenIdentities.size() == 0) {
showError("msg.selectionempty");
} else {
doAddIdentitiesToGroup(ureq, choosenIdentities, customTemplate);
}
return StepsMainRunController.DONE_MODIFIED;
}
};
userToGroupWizard = new StepsMainRunController(ureq, getWindowControl(), start, finish, null, translate("overview.addusers"), "o_sel_secgroup_import_logins_wizard");
listenTo(userToGroupWizard);
getWindowControl().pushAsModalDialog(userToGroupWizard.getInitialComponent());
}
Aggregations