use of uk.nhs.digital.common.components.info.ListPickerComponentInfo in project hippo by NHS-digital-website.
the class ListPickerComponent method doBeforeRender.
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) {
final ListPickerComponentInfo paramInfo = getComponentParametersInfo(request);
final List<HippoDocument> documentItems = getDocumentItems(paramInfo);
final int pageSize = getPageSize(request, paramInfo);
final int page = getAnyIntParameter(request, REQUEST_PARAM_PAGE, 1);
final Pageable<HippoDocument> pageable = getPageableFactory().createPageable(documentItems, page, pageSize);
request.setModel(REQUEST_ATTR_PAGEABLE, pageable);
request.setAttribute(REQUEST_ATTR_PARAM_INFO, paramInfo);
}
Aggregations