Base Dynamic Component

This feature is available since Bloomreach Experience Manager 14.3.0

Class Name

The Base Dynamic Component is implemented by the class

org.hippoecm.hst.component.support.bean.dynamic.BaseHstDynamicComponent

Purpose

This class is used to contribute parameter data to the Delivery API for use in a frontend application, using parameter metadata stored in the component catalog for a channel. Parameters configured as type JcrPath will result in lookups of individual documents, which will also be contributed to the page model output.

Component Parameters

Name 

Type

Default value

Description

*

(Any other than JcrPath)

-

Parameter name and value will be rendered via the Delivery API

*

JcrPath

-

This component will process all parameters of this type, lookup the referenced document by its path, and include its content in the Delivery API. If the path references any node other than a document, only the path itself will be rendered.

Below you can see how the BaseDynamicHstComponent renders its parameters in the JSON response in Delivery API:

"uid2": {
  "id": "r22_r1_r1",
  "links": {
    "self": {
      "href": "http://localhost/site/resourceapi?_hn:type=component-rendering&_hn:ref=r22_r1_r1",
      "type": "external"
    }
  },
  "meta": {
    "paramsInfo": {
      "dateParam": 1584612567000,
      "document": "news/news1",
      "paramWithDefaultValue": "a default value",
      "decimalParam": 20.5,
      "booleanParam": true,
      "integerParam": 15,
      "param1": "value 1 in container item",
      "dropdownParam": "value1",
      "param2": "value 2 in container item"
    },
    "params": {}
  },
  "name": "testcatalogiteminstance",
  "label": "Test Catalog Item",
  "type": "container-item",
  "componentClass": "org.hippoecm.hst.component.support.bean.dynamic.BaseHstDynamicComponent",
  "models": {
    "document": {
      "$ref": "/page/u303d40ebf98c4d6184c7a1ba14b5ceb3"
    }
  }
}
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?