private MultipleSelectionElement initTreeRec(
      int level, VFSItem item, FormLayoutContainer layoutcont) {
    SelectNodeObject node = new SelectNodeObject(item, UUID.randomUUID().toString(), level);

    String[] singleKey = new String[] {node.getId()};
    String[] singleValue = new String[] {node.getName()};
    String[] css = new String[] {"b_with_small_icon_left " + node.getIconCssClass()};
    MultipleSelectionElement nodeSelection =
        uifactory.addCheckboxesVertical(
            "print.node.list." + nodeSelections.size(), layoutcont, singleKey, singleValue, css, 1);
    nodeSelection.setLabel("multi.sps.file", null);

    nodeSelection.setUserObject(node);
    nodeSelection.addActionListener(this, FormEvent.ONCLICK);
    nodeSelections.add(nodeSelection);
    identToSelectionMap.put(node.getId(), nodeSelection);
    layoutcont.add(nodeSelection.getComponent().getComponentName(), nodeSelection);

    if (item instanceof VFSContainer) {
      VFSContainer container = (VFSContainer) item;
      for (VFSItem subItem : container.getItems(new MultiSPVFSItemFilter())) {
        MultipleSelectionElement sel = initTreeRec(level + 1, subItem, layoutcont);
        node.getChildren().add(sel);
      }
    }

    return nodeSelection;
  }
  @Override
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    setFormTitle("settings.title");
    formLayout.setElementCssClass("o_sel_course_forum_settings");

    if (forumModule.isAnonymousPostingWithPseudonymEnabled()) {
      String[] allowPseudonymValues = new String[] {translate("allow.pseudonym.post")};
      allowPseudonymEl =
          uifactory.addCheckboxesHorizontal(
              "allow.pseudonym", formLayout, allowKeys, allowPseudonymValues);
      allowPseudonymEl.setElementCssClass("o_sel_course_forum_allow_pseudo");
      allowPseudonymEl.setLabel(null, null);
      allowPseudonymEl.addActionListener(FormEvent.ONCHANGE);

      if ("true"
          .equals(
              foNode
                  .getModuleConfiguration()
                  .getStringValue(FOCourseNodeEditController.PSEUDONYM_POST_ALLOWED))) {
        allowPseudonymEl.select(allowKeys[0], true);
      }
    }

    String[] allowGuestValues = new String[] {translate("allow.guest.post")};
    allowGuestEl =
        uifactory.addCheckboxesHorizontal("allow.guest", formLayout, allowKeys, allowGuestValues);
    allowGuestEl.setElementCssClass("o_sel_course_forum_allow_guest");
    allowGuestEl.setLabel(null, null);
    allowGuestEl.addActionListener(FormEvent.ONCHANGE);
    if ("true"
        .equals(
            foNode
                .getModuleConfiguration()
                .getStringValue(FOCourseNodeEditController.GUEST_POST_ALLOWED))) {
      allowGuestEl.select(allowKeys[0], true);
    }
  }