Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-13490

Create BaseComponent (base generic component)

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.3.0, 100.4.0
    • None
    • None

    Description

      Base class for all generic components. 

      • The component echoes all its params
        • In PMA, this is ootb
        • For FTL, the component will need to set the parametersinfo in the request, as an attribute
      • Allows adding multiple JcrPath and ImageSetPath parameters
        • Finds all parameters of those 2 types, resolves the beans that are referenced and sets those beans as separate models in the request. 
          • In PMA, these will appear as top level {parametername - ref} entries under attribute models, for example:
            models:
 {

              carouselItem1: {ref: "xxx" },

              carouselItem2: {ref: "yyy" }
 
            }
          • In FTL, all beans are available as request attributes, strongly typed (HST beans), having as key_s_ their parametername_s_.
            They are accessible via FTL’s expression language, for example:
            ${carouselItem1.title?html}

       

      Parameters 

      Name  Type Default value Description
      * * - Parameter will be echoed
      * JcrPath - Component will process all parameters of this type, resolve the beans and set them on the request
      * ImageSetPath - Component will process all parameters of this type, resolve the beans and set them on the request

      Class
      Class org.onehippo.cms7.essentials.components.EssentialsDocumentComponent can be used as a starting point (but no subclassing). The new class finds all parameters of type ImageSetPath and JcrPath.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mchatzidakis Minos Chatzidakis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: