本文整理汇总了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");
}
示例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);
}
示例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;
}
}
示例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);
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}