protected void searchPaging(final RenderData data, final SearchForm form) { RenderDataUtil.register( data, "fileConfigItems", fileConfigService.getFileConfigList(fileConfigPager)); // page navi // restore from pager copyBeanToBean(fileConfigPager, form, op -> op.include("id")); }
protected void searchPaging(final RenderData data, final SearchForm form) { RenderDataUtil.register( data, "failureUrlItems", failureUrlService.getFailureUrlList(failureUrlPager)); // page navi // restore from pager copyBeanToBean( failureUrlPager, form, op -> op.include("url", "errorCountMin", "errorCountMax", "errorName")); }
private HtmlResponse asListHtml() { return asHtml(path_AdminRole_AdminRoleJsp) .renderWith( data -> { RenderDataUtil.register( data, "roleItems", roleService.getRoleList(rolePager)); // page navi }) .useForm( SearchForm.class, setup -> { setup.setup( form -> { copyBeanToBean(rolePager, form, op -> op.include("id")); }); }); }
private HtmlResponse asListHtml() { return asHtml(path_AdminFileconfig_AdminFileconfigJsp) .renderWith( data -> { RenderDataUtil.register( data, "fileConfigItems", fileConfigService.getFileConfigList(fileConfigPager)); // page navi }) .useForm( SearchForm.class, setup -> { setup.setup( form -> { copyBeanToBean(fileConfigPager, form, op -> op.include("id")); }); }); }
private HtmlResponse asListHtml() { return asHtml(path_AdminFailureurl_AdminFailureurlJsp) .renderWith( data -> { RenderDataUtil.register( data, "failureUrlItems", failureUrlService.getFailureUrlList(failureUrlPager)); // page navi }) .useForm( SearchForm.class, setup -> { setup.setup( form -> { copyBeanToBean( failureUrlPager, form, op -> op.include("url", "errorCountMin", "errorCountMax", "errorName")); }); }); }
public void register(final RenderData data) { RenderDataUtil.register(data, "queryId", queryId); RenderDataUtil.register(data, "documentItems", documentItems); RenderDataUtil.register(data, "facetResponse", facetResponse); RenderDataUtil.register(data, "appendHighlightParams", appendHighlightParams); RenderDataUtil.register(data, "execTime", execTime); RenderDataUtil.register(data, "pageSize", pageSize); RenderDataUtil.register(data, "currentPageNumber", currentPageNumber); RenderDataUtil.register(data, "allRecordCount", allRecordCount); RenderDataUtil.register(data, "allPageCount", allPageCount); RenderDataUtil.register(data, "existNextPage", existNextPage); RenderDataUtil.register(data, "existPrevPage", existPrevPage); RenderDataUtil.register(data, "currentStartRecordNumber", currentStartRecordNumber); RenderDataUtil.register(data, "currentEndRecordNumber", currentEndRecordNumber); RenderDataUtil.register(data, "pageNumberList", pageNumberList); RenderDataUtil.register(data, "partialResults", partialResults); RenderDataUtil.register(data, "queryTime", queryTime); RenderDataUtil.register(data, "searchQuery", searchQuery); RenderDataUtil.register(data, "requestedTime", requestedTime); }
protected HtmlResponse doSearch(final SearchForm form) { validate(form, messages -> {}, () -> asHtml(path_SearchJsp)); if (isLoginRequired()) { return redirectToLogin(); } if (viewHelper.isUseSession()) { final HttpSession session = request.getSession(false); if (session != null) { final Object resultsPerPage = session.getAttribute(Constants.RESULTS_PER_PAGE); if (resultsPerPage instanceof Integer) { form.num = (Integer) resultsPerPage; } } } if (StringUtil.isBlank(form.q) && form.fields.isEmpty()) { // redirect to index page form.q = null; return redirectToRoot(); } try { buildFormParams(form); form.lang = searchService.getLanguages(request, form); request.setAttribute(Constants.REQUEST_LANGUAGES, form.lang); request.setAttribute(Constants.REQUEST_QUERIES, form.q); final WebRenderData renderData = new WebRenderData(); searchService.search(form, renderData, getUserBean()); return asHtml(path_SearchJsp) .renderWith( data -> { renderData.register(data); // favorite or thumbnail if (favoriteSupport || thumbnailSupport) { final String queryId = renderData.getQueryId(); final List<Map<String, Object>> documentItems = renderData.getDocumentItems(); userInfoHelper.storeQueryId(queryId, documentItems); if (thumbnailSupport) { thumbnailManager.storeRequest(queryId, documentItems); } } RenderDataUtil.register( data, "displayQuery", getDisplayQuery( form, labelTypeHelper.getLabelTypeItemList(SearchRequestType.SEARCH))); createPagingQuery(form); }); } catch (final InvalidQueryException e) { if (logger.isDebugEnabled()) { logger.debug(e.getMessage(), e); } saveError(e.getMessageCode()); return redirectToRoot(); } catch (final ResultOffsetExceededException e) { if (logger.isDebugEnabled()) { logger.debug(e.getMessage(), e); } saveError( messages -> { messages.addErrorsResultSizeExceeded(GLOBAL); }); return redirectToRoot(); } }
protected void registerRolesAndLabels(final RenderData data) { RenderDataUtil.register(data, "roleTypeItems", roleTypeService.getRoleTypeList()); RenderDataUtil.register(data, "labelTypeItems", labelTypeService.getLabelTypeList()); }
protected void searchPaging(final RenderData data, final SearchForm form) { RenderDataUtil.register(data, "roleItems", roleService.getRoleList(rolePager)); // page navi // restore from pager copyBeanToBean(rolePager, form, op -> op.include("id")); }