use of org.hippoecm.hst.core.request.HstRequestContext in project hippo by NHS-digital-website.
the class ServiceComponent method doBeforeRender.
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
super.doBeforeRender(request, response);
final HstRequestContext ctx = request.getRequestContext();
Service document = (Service) ctx.getContentBean();
request.setAttribute("document", document);
}
use of org.hippoecm.hst.core.request.HstRequestContext in project hippo by NHS-digital-website.
the class SystemServicesComponent method doBeforeRender.
@Override
public void doBeforeRender(HstRequest request, HstResponse response) {
super.doBeforeRender(request, response);
final HstRequestContext ctx = request.getRequestContext();
VisualHub visualHub = (VisualHub) ctx.getContentBean();
if (visualHub != null) {
request.setAttribute("document", visualHub);
}
}
use of org.hippoecm.hst.core.request.HstRequestContext in project hippo by NHS-digital-website.
the class PublicationBase method getRelatedDocuments.
protected <T extends HippoBean> List<T> getRelatedDocuments(String property, Class<T> beanClass) throws HstComponentException, QueryException {
final HstRequestContext context = RequestContextProvider.get();
HstQuery query = ContentBeanUtils.createIncomingBeansQuery(this.getCanonicalBean(), context.getSiteContentBaseBean(), property, beanClass, false);
return toList(query.execute().getHippoBeans());
}
use of org.hippoecm.hst.core.request.HstRequestContext in project hippo by NHS-digital-website.
the class IndicatorComponent method doBeforeRender.
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
super.doBeforeRender(request, response);
final HstRequestContext ctx = request.getRequestContext();
Indicator indicator = getIndicator(ctx);
request.setAttribute("indicator", indicator);
}
use of org.hippoecm.hst.core.request.HstRequestContext in project hippo by NHS-digital-website.
the class NiLandingComponent method doBeforeRender.
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
super.doBeforeRender(request, response);
final HstRequestContext ctx = request.getRequestContext();
request.setAttribute("document", ctx.getContentBean());
}
Aggregations