Search in sources :

Example 1 with AzListComponentInfo

use of uk.nhs.digital.common.components.info.AzListComponentInfo in project hippo by NHS-digital-website.

the class AzListComponent method doBeforeRender.

@Override
public void doBeforeRender(HstRequest request, HstResponse response) {
    super.doBeforeRender(request, response);
    final AzListComponentInfo componentParametersInfo = getComponentParametersInfo(request);
    String headerText = componentParametersInfo.getHeaderText();
    request.setAttribute("headerText", headerText);
    String buttonText = componentParametersInfo.getButtonText();
    request.setAttribute("buttonText", buttonText);
    String navigationDocumentPath = componentParametersInfo.getNavigationDocument();
    HippoDocument bean = this.getHippoBeanForPath(navigationDocumentPath, HippoDocument.class);
    request.setAttribute("navigationDocument", bean);
}
Also used : HippoDocument(org.hippoecm.hst.content.beans.standard.HippoDocument) AzListComponentInfo(uk.nhs.digital.common.components.info.AzListComponentInfo)

Aggregations

HippoDocument (org.hippoecm.hst.content.beans.standard.HippoDocument)1 AzListComponentInfo (uk.nhs.digital.common.components.info.AzListComponentInfo)1