• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PaginatedList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.displaytag.pagination.PaginatedList的典型用法代码示例。如果您正苦于以下问题:Java PaginatedList类的具体用法?Java PaginatedList怎么用?Java PaginatedList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PaginatedList类属于org.displaytag.pagination包,在下文中一共展示了PaginatedList类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: HtmlTableWriter

import org.displaytag.pagination.PaginatedList; //导入依赖的package包/类
/**
 * This table writer uses a <code>TableTag</code> and a <code>JspWriter</code> to do its work.
 * @param tableTag <code>TableTag</code> instance called back by this writer.
 * @param out The output destination.
 */
public HtmlTableWriter(
    TableProperties tableProperties,
    Href baseHref,
    boolean export,
    JspWriter out,
    CaptionTag captionTag,
    PaginatedList paginatedList,
    SmartListHelper listHelper,
    int pagesize,
    HtmlAttributeMap attributeMap,
    String uid)
{
    this.properties = tableProperties;
    this.baseHref = baseHref;
    this.export = export;
    this.out = out;
    this.captionTag = captionTag;
    this.paginatedList = paginatedList;
    this.listHelper = listHelper;
    this.pagesize = pagesize;
    this.attributeMap = attributeMap;
    this.uid = uid;
}
 
开发者ID:webbfontaine,项目名称:displaytag,代码行数:29,代码来源:HtmlTableWriter.java


示例2: initialisePaginatedListParameters

import org.displaytag.pagination.PaginatedList; //导入依赖的package包/类
/**
 * This methods checks the parameters passed to the page that deals with the
 * pagination.
 * The sort value can be set to 1 or 2. If out of bound, set 1 (default)
 * The page size value can be set to 1 or 2. If out of bound, set 1 (default)
 * @param paginatedList
 * @param request
 */
private PaginatedList initialisePaginatedListParameters(
        HttpStatusCodeFamily httpStatusCode,
        int totalNumberOfElements,
        String pageSize,
        String sortDirection,
        String sortCriterion,
        String pageNumber,
        Collection<Integer> authorizedPageSize,
        Collection<String> authorizedSortCriterion) {

    TgolPaginatedListImpl paginatedList;
    // depending on the httpStatusCodeFamily, the default sort Criterion is
    // different : Mark for the 2xx and HttpStatusCode for the others
    if (httpStatusCode.equals(HttpStatusCodeFamily.f2xx)) {
        paginatedList = new TgolPaginatedListImpl(default2xxSortCriterion);
    } else {
        paginatedList = new TgolPaginatedListImpl(default3xxSortCriterion);
    }
    
    // populate the paginatedList object with default values (the sortCriterion
    // is already populated at this moment.
    paginatedList.setObjectsPerPage(defaultPageSize);
    paginatedList.setPageNumber(defaultPageNumber);
    paginatedList.setSortDirection(SortOrderEnum.ASCENDING);

    setObjectsPerPage(paginatedList, totalNumberOfElements, pageSize, authorizedPageSize);
    setSortDirection(paginatedList, sortDirection);
    setSortCriterion(paginatedList, sortCriterion, authorizedSortCriterion);
    setPageNumber(paginatedList, totalNumberOfElements, pageNumber);
    paginatedList.setFullListSize(totalNumberOfElements);
    return (PaginatedList)paginatedList;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:41,代码来源:TgolPaginatedListFactory.java


示例3: preparePageListStatsByHttpStatusCode

import org.displaytag.pagination.PaginatedList; //导入依赖的package包/类
/**
     * 
     * @param audit
     * @param model
     * @param httpStatusCode
     * @param request
     * @param returnRedirectView
     * @return
     * @throws ServletRequestBindingException 
     */
    protected String preparePageListStatsByHttpStatusCode(
            Audit audit,
            Model model,
            HttpStatusCodeFamily httpStatusCode,
            HttpServletRequest request,
            boolean returnRedirectView) throws ServletRequestBindingException {
        
        String invalidTest = ServletRequestUtils.getStringParameter(request, TgolPaginatedListFactory.INVALID_TEST_PARAM);
        
        if (invalidTest != null && !this.invalidTestValueCheckerPattern.matcher(invalidTest).matches()) {
            throw new ForbiddenPageException();
        }

        PaginatedList paginatedList = TgolPaginatedListFactory.getInstance().getPaginatedList(
                httpStatusCode,
                ServletRequestUtils.getStringParameter(request, TgolPaginatedListFactory.PAGE_SIZE_PARAM),
                ServletRequestUtils.getStringParameter(request, TgolPaginatedListFactory.SORT_DIRECTION_PARAM),
                ServletRequestUtils.getStringParameter(request, TgolPaginatedListFactory.SORT_CRITERION_PARAM),
                ServletRequestUtils.getStringParameter(request, TgolPaginatedListFactory.PAGE_PARAM),
                ServletRequestUtils.getStringParameter(request, TgolPaginatedListFactory.SORT_CONTAINING_URL_PARAM),
                invalidTest,
                authorizedPageSize,
                authorizedSortCriterion,
                audit.getId());

        model.addAttribute(TgolKeyStore.PAGE_LIST_KEY, paginatedList);
        model.addAttribute(TgolKeyStore.AUTHORIZED_PAGE_SIZE_KEY, authorizedPageSize);
        model.addAttribute(TgolKeyStore.AUTHORIZED_SORT_CRITERION_KEY, authorizedSortCriterion);
        setFromToValues(paginatedList, model);
        
        // don't forge to add audit statistics to model
//        addAuditStatisticsToModel(audit, model, TgolKeyStore.TEST_DISPLAY_SCOPE_VALUE);
        return (returnRedirectView) ? TgolKeyStore.PAGE_LIST_XXX_VIEW_REDIRECT_NAME : TgolKeyStore.PAGE_LIST_XXX_VIEW_NAME;
    }
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:45,代码来源:AbstractAuditDataHandlerController.java


示例4: setFromToValues

import org.displaytag.pagination.PaginatedList; //导入依赖的package包/类
/**
 *
 * @param pageResultList
 * @param model
 * @return
 */
private void setFromToValues(PaginatedList pageResultList, Model model) {
    model.addAttribute(FROM_VALUE,
            (pageResultList.getPageNumber()-1) * pageResultList.getObjectsPerPage() +1);
    if (pageResultList.getList().size() < pageResultList.getObjectsPerPage()) {
        model.addAttribute(TO_VALUE,
                (pageResultList.getPageNumber()-1) * pageResultList.getObjectsPerPage() + pageResultList.getList().size());
    } else {
        model.addAttribute(TO_VALUE,
                (pageResultList.getPageNumber()) * pageResultList.getObjectsPerPage());
    }
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:18,代码来源:AbstractAuditDataHandlerController.java


示例5: getPaginatedList

import org.displaytag.pagination.PaginatedList; //导入依赖的package包/类
/**
 *
 * @param httpStatusCode
 * @param pageSize
 * @param sortDirection
 * @param sortCriterion
 * @param pageNumber
 * @param containingValue
 * @param invalidTestLabel
 * @param authorizedPageSize
 * @param authorizedSortCriterion
 * @param idAudit
 * @return
 */
public PaginatedList getPaginatedList(
        HttpStatusCodeFamily httpStatusCode,
        String pageSize,
        String sortDirection,
        String sortCriterion,
        String pageNumber,
        String containingValue,
        String invalidTestLabel,
        Collection<Integer> authorizedPageSize,
        Collection<String> authorizedSortCriterion,
        long idAudit) {

    // get the total number of pages for a given httpStatusCode family and
    // an url filter
    int totalNumberOfElements = statisticsDataService.getWebResourceCountByAuditAndHttpStatusCode(
            idAudit,
            httpStatusCode,
            invalidTestLabel,
            containingValue).intValue();

    // we check the parameters of the request and populate the pageResultList object
    PaginatedList paginatedList = initialisePaginatedListParameters(
            httpStatusCode,
            totalNumberOfElements,
            pageSize,
            sortDirection,
            sortCriterion,
            pageNumber,
            authorizedPageSize,
            authorizedSortCriterion);

    // sql request with the given parameters
    int startElement = (paginatedList.getPageNumber() - 1) * paginatedList.getObjectsPerPage();
    ((TgolPaginatedListImpl)paginatedList).addAllElements(
            statisticsDataService.getPageListByAuditAndHttpStatusCode(
            idAudit,
            httpStatusCode,
            invalidTestLabel,
            startElement,
            paginatedList.getObjectsPerPage(),
            paginatedList.getSortDirection(),
            paginatedList.getSortCriterion(),
            containingValue));
    return paginatedList;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:60,代码来源:TgolPaginatedListFactory.java



注:本文中的org.displaytag.pagination.PaginatedList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TeeInput类代码示例发布时间:2022-05-23
下一篇:
Java AlgorithmIdentifier类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap