code: private boolean hasSelectedChildren(List<CmsCategoryTreeEntry> children, Collection<String> selectedCategories) {
  
          boolean result = false;
          if (children == null) {
              return false;
          }
          for (CmsCategoryTreeEntry child : children) {
              result = selectedCategories.contains(child.getSitePath());
              if (result || hasSelectedChildren(child.getChildren(), selectedCategories)) {
                  return true;
              }
          }
  
          return result;
      }
docs: Checks if it has selected children.<p>
  
  @param children the children to check
  @param selectedCategories list of all selected categories
  
  @return true if it has selected children