private void doCreateSolution(UserRequest ureq) {
    newSolutionCtrl = new NewSolutionController(ureq, getWindowControl(), solutionContainer);
    listenTo(newSolutionCtrl);

    cmc =
        new CloseableModalController(
            getWindowControl(), "close", newSolutionCtrl.getInitialComponent());
    listenTo(cmc);
    cmc.activate();
  }
  @Override
  protected void event(UserRequest ureq, Controller source, Event event) {
    if (addSolutionCtrl == source) {
      if (event == Event.DONE_EVENT) {
        Solution newSolution = addSolutionCtrl.getSolution();
        solutions.getSolutions().add(newSolution);
        fireEvent(ureq, Event.DONE_EVENT);
        updateModel();
      }
      cmc.deactivate();
      cleanUp();
    } else if (editSolutionCtrl == source) {
      if (event == Event.DONE_EVENT) {
        fireEvent(ureq, Event.DONE_EVENT);
        updateModel();
      }
      cmc.deactivate();
      cleanUp();
    } else if (newSolutionCtrl == source) {
      Solution newSolution = newSolutionCtrl.getSolution();
      cmc.deactivate();
      cleanUp();

      if (event == Event.DONE_EVENT) {
        solutions.getSolutions().add(newSolution);
        doCreateSolutionEditor(ureq, newSolution);
        updateModel();
      }
    } else if (newSolutionEditorCtrl == source) {
      if (event == Event.DONE_EVENT) {
        updateModel();
        fireEvent(ureq, Event.DONE_EVENT);
      }
      cmc.deactivate();
      cleanUp();
    } else if (editSolutionEditorCtrl == source) {
      cmc.deactivate();
      cleanUp();
    } else if (cmc == source) {
      cleanUp();
    }
    super.event(ureq, source, event);
  }