listenTo(cmc);
cmc.activate();
} else if (source == createGroupsLink) {
// no groups in group management -> directly show group create dialog
BGContext bgContext = getDefaultBGContext();
String[] csvGroupName = easyGroupTE.isEmpty() ? new String[0] : easyGroupTE.getValue().split(",");
// determine if bulkmode or not
removeAsListenerAndDispose(groupCreateCntrllr);
boolean bulkMode = csvGroupName.length > 1;
groupCreateCntrllr = BGControllerFactory.getInstance().createNewBGController(ureq, getWindowControl(), true,
bgContext, bulkMode, easyGroupTE.getValue());
listenTo(groupCreateCntrllr);
//the main form gets overlayed -> hence do not mark as dirty
//otherwise clicking any link in the overlay results in a
//alert box -> "you have unsaved form data"
//one has to listen for cmc closing events and then reactivate
//dirty setting!! TODO:pb: find a better solution as this is error prone
this.flc.getRootForm().setDirtyMarking(false);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", groupCreateCntrllr.getInitialComponent());
listenTo(cmc);
cmc.activate();
} else if (source == chooseAreasLink) {
// already areas -> choose areas
removeAsListenerAndDispose(areaChooseC);
areaChooseC = new GroupOrAreaSelectionController(1, getWindowControl(), ureq, "area", courseEditorEnv.getCourseGroupManager(),
easyAreaTE.getValue());
listenTo(areaChooseC);
//the main form gets overlayed -> hence do not mark as dirty
//otherwise clicking any link in the overlay results in a
//alert box -> "you have unsaved form data"
//one has to listen for cmc closing events and then reactivate
//dirty setting!! TODO:pb: find a better solution as this is error prone
this.flc.getRootForm().setDirtyMarking(false);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", areaChooseC.getInitialComponent(), true, getTranslator().translate("popupchooseareas"));
listenTo(cmc);
cmc.activate();
} else if (source == createAreasLink) {
// no areas -> directly show creation dialog
BGContext bgContext = getDefaultBGContext();
removeAsListenerAndDispose(areaCreateCntrllr);
String[] csvAreaName = easyAreaTE.isEmpty() ? new String[0] : easyAreaTE.getValue().split(",");
// determine if bulkmode or not
boolean bulkMode = csvAreaName.length > 1;
areaCreateCntrllr = BGControllerFactory.getInstance().createNewAreaController(ureq, getWindowControl(),
bgContext, bulkMode, easyAreaTE.getValue());
listenTo(areaCreateCntrllr);
//the main form gets overlayed -> hence do not mark as dirty
//otherwise clicking any link in the overlay results in a
//alert box -> "you have unsaved form data"
//one has to listen for cmc closing events and then reactivate
//dirty setting!! TODO:pb: find a better solution as this is error prone
this.flc.getRootForm().setDirtyMarking(false);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", areaCreateCntrllr.getInitialComponent());
listenTo(cmc);
cmc.activate();
} else if (source == fixGroupError) {
/*
* user wants to fix problem with fixing group error link e.g. create one
* or more group at once.
*/
BGContext bgContext = getDefaultBGContext();
if (groupCreateCntrllr != null) groupCreateCntrllr.dispose();
String[] csvGroupName = (String[]) fixGroupError.getUserObject();
// determine if bulkmode or not
boolean bulkMode = csvGroupName.length > 1;
removeAsListenerAndDispose(groupCreateCntrllr);
groupCreateCntrllr = BGControllerFactory.getInstance().createNewBGController(ureq, getWindowControl(), true,
bgContext, bulkMode, csvGroupName[0]);
listenTo(groupCreateCntrllr);
//the main form gets overlayed -> hence do not mark as dirty
//otherwise clicking any link in the overlay results in a
//alert box -> "you have unsaved form data"
//one has to listen for cmc closing events and then reactivate
//dirty setting!! TODO:pb: find a better solution as this is error prone
this.flc.getRootForm().setDirtyMarking(false);
removeAsListenerAndDispose(cmc);
cmc = new CloseableModalController(getWindowControl(), "close", groupCreateCntrllr.getInitialComponent());
listenTo(cmc);
cmc.activate();
} else if (source == fixAreaError) {
/*
* user wants to fix problem with fixing area error link e.g. create one
* or more areas at once.
*/
BGContext bgContext = getDefaultBGContext();
removeAsListenerAndDispose(areaCreateCntrllr);
String[] csvAreaName = (String[]) fixAreaError.getUserObject();
// determine if bulkmode or not
boolean bulkMode = csvAreaName.length > 1;
areaCreateCntrllr = BGControllerFactory.getInstance().createNewAreaController(ureq, getWindowControl(),