Search in sources :

Example 1 with HippoResultSetBean

use of org.hippoecm.hst.content.beans.standard.HippoResultSetBean in project hippo by NHS-digital-website.

the class SearchComponent method buildAndExecuteHstSearch.

private void buildAndExecuteHstSearch(HstRequest request, SearchComponentInfo paramInfo) {
    HippoFacetNavigationBean facetNavigationBean = getFacetNavigationBean(request);
    if (facetNavigationBean != null) {
        HippoResultSetBean resultSet = facetNavigationBean.getResultSet();
        if (resultSet != null) {
            Pageable<HippoBean> pageable = getPageableFactory().createPageable(resultSet.getDocumentIterator(HippoBean.class), facetNavigationBean.getCount().intValue(), paramInfo.getPageSize(), getCurrentPage(request));
            request.setAttribute("pageable", pageable);
            request.setAttribute("pageNumbers", getHstPageNumbers(pageable));
        }
    }
    setCommonSearchRequestAttributes(request, paramInfo);
    request.setAttribute("area", getAreaOption(request).toString());
    request.setAttribute("facets", facetNavigationBean);
}
Also used : HippoBean(org.hippoecm.hst.content.beans.standard.HippoBean) HippoFacetNavigationBean(org.hippoecm.hst.content.beans.standard.HippoFacetNavigationBean) HippoResultSetBean(org.hippoecm.hst.content.beans.standard.HippoResultSetBean)

Aggregations

HippoBean (org.hippoecm.hst.content.beans.standard.HippoBean)1 HippoFacetNavigationBean (org.hippoecm.hst.content.beans.standard.HippoFacetNavigationBean)1 HippoResultSetBean (org.hippoecm.hst.content.beans.standard.HippoResultSetBean)1