Class CmsDetailOnlyContainerPageBuilder

java.lang.Object
org.opencms.ade.containerpage.CmsDetailOnlyContainerPageBuilder

This is a simple helper class to more easily produce container page beans to be used as detail-only containers.

To use this helper, you will need to set the type or width of each container and then add the resources to be used as container elements. The type or width must be set because this helper tries to automatically determine a default formatter for each container element.

Finally, call the build() method to produce the desired container page bean Element settings and nested containers are currently not supported.

  • Constructor Details

  • Method Details

    • addContainerElement

      public void addContainerElement(String name, CmsResource resource)
      Adds a resource to a container as an element.

      Parameters:
      name - the container name
      resource - the resource to add as a container elementv
    • build

      Builds the container page bean.

      Returns:
      the container page bean
    • setContainerType

      public void setContainerType(String name, String type)
      Sets the type of a container.

      Parameters:
      name - the container name
      type - the container type
    • setContainerWidth

      public void setContainerWidth(String name, String width)
      Sets the width of a container.

      Parameters:
      name - the container name
      width - the container width