当前位置: 首页>>代码示例>>Java>>正文


Java RenderUtils.sortCollectionWithCriteria方法代码示例

本文整理汇总了Java中pt.ist.fenixWebFramework.renderers.utils.RenderUtils.sortCollectionWithCriteria方法的典型用法代码示例。如果您正苦于以下问题:Java RenderUtils.sortCollectionWithCriteria方法的具体用法?Java RenderUtils.sortCollectionWithCriteria怎么用?Java RenderUtils.sortCollectionWithCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pt.ist.fenixWebFramework.renderers.utils.RenderUtils的用法示例。


在下文中一共展示了RenderUtils.sortCollectionWithCriteria方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showAlumniList

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@EntryPoint
public ActionForward showAlumniList(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
        HttpServletResponse response) throws Exception {

    AlumniSearchBean searchBean = reconstructBeanFromRequest(request);

    if (!StringUtils.isEmpty(searchBean.getName()) || searchBean.getDegreeType() != null) {

        List<Registration> resultRegistrations = readAlumniRegistrations(searchBean);

        if (request.getParameter("sort") != null && request.getParameter("sort").length() > 0) {
            resultRegistrations = RenderUtils.sortCollectionWithCriteria(resultRegistrations, request.getParameter("sort"));
        } else {
            resultRegistrations = RenderUtils.sortCollectionWithCriteria(resultRegistrations, "student.person.name");
        }

        searchBean.setAlumni(new ArrayList<Registration>(resultRegistrations));
        searchBean.setTotalItems(resultRegistrations.size());
    }

    request.setAttribute("searchAlumniBean", searchBean);
    return mapping.findForward("showAlumniList");
}
 
开发者ID:FenixEdu,项目名称:fenixedu-academic,代码行数:24,代码来源:AlumniSearchDA.java

示例2: getLayout

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected Layout getLayout(Object object, Class type) {
    Collection sortedCollection =
            (isSortIgnored()) ? (Collection) object : RenderUtils
                    .sortCollectionWithCriteria((Collection) object, getSortBy());

    return new OrderedCollectionTabularLayout(sortedCollection);
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:9,代码来源:OrderableCollectionRenderer.java

示例3: sortCollection

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
protected Collection sortCollection(Collection collection) {
    if (getSortBy() != null) {
        return RenderUtils.sortCollectionWithCriteria(collection, getSortBy());
    } else {
        return collection;
    }
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:8,代码来源:BaseRenderObjectTag.java

示例4: getLayout

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected Layout getLayout(Object object, Class type) {
    Collection sortedCollection = RenderUtils.sortCollectionWithCriteria((Collection) object, getSortBy());

    Collection pagedSortedCollection = checkForPager(sortedCollection);
    if (pagedSortedCollection != null) {
        sortedCollection = pagedSortedCollection;
    }

    return new CollectionTabularLayout(sortedCollection);
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:12,代码来源:CollectionRenderer.java

示例5: getPossibleObjects

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
protected Collection<?> getPossibleObjects() {
    Object object = ((MetaSlot) getInputContext().getMetaObject()).getMetaObject().getObject();
    Object value = getInputContext().getMetaObject().getObject();

    Collection<?> collection = (Collection<?>) getProvider().provide(object, value);

    if (getSortBy() == null) {
        return collection;
    }
    return RenderUtils.sortCollectionWithCriteria(collection, getSortBy());
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:12,代码来源:SelectionRenderer.java

示例6: getLayout

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected Layout getLayout(Object object, Class type) {
    Collection sortedCollection = RenderUtils.sortCollectionWithCriteria((Collection) object, getSortBy());

    return new ListRendererLayout(sortedCollection);
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:7,代码来源:ListRenderer.java

示例7: getLayout

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected Layout getLayout(Object object, Class type) {
    Collection sortedCollection = RenderUtils.sortCollectionWithCriteria((Collection) object, getSortBy());

    return new TabularListRendererLayout(sortedCollection);
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:7,代码来源:TabularListRenderer.java

示例8: getLayout

import pt.ist.fenixWebFramework.renderers.utils.RenderUtils; //导入方法依赖的package包/类
@Override
protected Layout getLayout(Object object, Class type) {
    Collection sortedCollection = RenderUtils.sortCollectionWithCriteria((Collection) object, getSortBy());

    return new AjaxTabularLayout(sortedCollection);
}
 
开发者ID:FenixEdu,项目名称:bennu-renderers,代码行数:7,代码来源:AjaxTableRenderer.java


注:本文中的pt.ist.fenixWebFramework.renderers.utils.RenderUtils.sortCollectionWithCriteria方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。