code: public CmsContainerPageElementPanel createElement(
          CmsContainerElementData containerElement,
          I_CmsDropContainer container,
          boolean isNew)
      throws Exception {
  
          if (containerElement.isGroupContainer() || containerElement.isInheritContainer()) {
              List<CmsContainerElementData> subElements = new ArrayList<CmsContainerElementData>();
              for (String subId : containerElement.getSubItems()) {
                  CmsContainerElementData element = m_controller.getCachedElement(subId);
                  if (element != null) {
                      subElements.add(element);
                  } else {
                      CmsDebugLog.getInstance().printLine("Cached element not found");
                  }
              }
              return createGroupcontainerElement(containerElement, subElements, container);
          }
          Element element = CmsDomUtil.createElement(containerElement.getContents().get(container.getContainerId()));
          // ensure any embedded flash players are set opaque so UI elements may be placed above them
          CmsDomUtil.fixFlashZindex(element);
          if (isNew) {
              CmsContentEditor.replaceResourceIds(
                  element,
                  CmsUUID.getNullUUID().toString(),
                  CmsContainerpageController.getServerId(containerElement.getClientId()));
          }
  
          CmsContainerPageElementPanel result = createElement(element, container, containerElement);
          if (!CmsContainerpageController.get().shouldShowInContext(containerElement)) {
              result.getElement().getStyle().setDisplay(Style.Display.NONE);
              result.addStyleName(CmsTemplateContextInfo.DUMMY_ELEMENT_MARKER);
          }
          return result;
      }
docs: Creates an drag container element.<p>
  
  @param containerElement the container element data
  @param container the container parent
  @param isNew in case of a newly created element
  
  @return the draggable element
  
  @throws Exception if something goes wrong