// user wants to choose groups.. either link clicked -> Startpoint for
// group choosing workflow
if (groupChooseC != null) groupChooseC.dispose();
// already groups -> it is about selecting groups
groupChooseC = new GroupOrAreaSelectionController(0, getWindowControl(), ureq, "group", cev.getCourseGroupManager(),
easyGroupTE.getValue());
groupChooseC.addControllerListener(this);
//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);
if (cmc != null) cmc.dispose();
cmc = new CloseableModalController(getWindowControl(), "close", groupChooseC.getInitialComponent(), true, getTranslator().translate("popupchoosegroups"));
cmc.addControllerListener(this);
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
if (groupCreateCntrllr != null) groupCreateCntrllr.dispose();
boolean bulkMode = csvGroupName.length > 1;
groupCreateCntrllr = BGControllerFactory.getInstance().createNewBGController(ureq, getWindowControl(), true,
bgContext, bulkMode, easyGroupTE.getValue());
groupCreateCntrllr.addControllerListener(this);
//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);
if (cmc != null) cmc.dispose();
cmc = new CloseableModalController(getWindowControl(), "close", groupCreateCntrllr.getInitialComponent());
cmc.addControllerListener(this);
cmc.activate();
} else if (source == chooseAreasLink) {
if (areaChooseC != null) areaChooseC.dispose();
// already areas -> choose areas
if (areaChooseC != null) areaChooseC.dispose();
areaChooseC = new GroupOrAreaSelectionController(1, getWindowControl(), ureq, "area", cev.getCourseGroupManager(),
easyAreaTE.getValue());
areaChooseC.addControllerListener(this);
//the main form gets overlayed -> hence do not mark as dirty
//otherwise clicking any link in the overlay results in a