code: public static List<CmsContainerElementBean> getGroupContainerElements(
          CmsObject cms,
          CmsContainerElementBean element,
          ServletRequest req,
          String containerType)
      throws CmsException {
  
          List<CmsContainerElementBean> subElements;
          CmsXmlGroupContainer xmlGroupContainer = CmsXmlGroupContainerFactory.unmarshal(cms, element.getResource(), req);
          CmsGroupContainerBean groupContainer = xmlGroupContainer.getGroupContainer(cms);
          groupContainer = CmsTemplateMapper.get(req).transformGroupContainer(
              cms,
              groupContainer,
              xmlGroupContainer.getFile().getRootPath());
          if (!CmsElementUtil.checkGroupAllowed(containerType, groupContainer)) {
              LOG.warn(
                  new CmsIllegalStateException(
                      Messages.get().container(
                          Messages.ERR_XSD_NO_TEMPLATE_FORMATTER_3,
                          element.getResource().getRootPath(),
                          OpenCms.getResourceManager().getResourceType(element.getResource()).getTypeName(),
                          containerType)));
              return Collections.emptyList();
          }
          subElements = groupContainer.getElements();
          return subElements;
      }
docs: Returns the element group elements.<p>
  
  @param cms the current cms context
  @param element group element
  @param req the servlet request
  @param containerType the container type
  
  @return the elements of this group
  
  @throws CmsException if something goes wrong