XPage - 对过滤视图进行排序 [英] XPages - Sorting a filtered view

查看:39
本文介绍了XPage - 对过滤视图进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 XPage 上有一个 DominoView 数据源,它使用 URL 参数进行过滤,以便只显示与此参数匹配的文档.

I have a DominoView data source on my XPage that is filtered using a URL parameter so that only documents matching this parm are displayed.

然后需要按第二列(状态字段)的值对过滤后的文档进行排序.最好的方法是什么?

The filtered documents then need to be sorted by the value of the second column (a status field). What would be the best approach to this?

XPage 使用 jQuery Mobile 进行演示,理想情况下,文档将显示在一个可折叠列表中,每个状态值都有一个单独的可折叠列表.

The XPage is using jQuery Mobile for presentation and the documents would, ideally, be presented in a collapsible list with a separate collapsible for each status value.

感谢您的建议.

推荐答案

最简单的方法是将该视图也排在第二列中.不需要额外的代码.您可以有多个不需要相邻的排序列.然后你可以有更好的过滤键.例如,您有 4 个已排序的列:您使用一个包含 1-4 个元素的数组作为过滤器.使用 1 个元素,它在第一列上进行过滤.有 2 个元素,它过滤第一列和第二列等.返回的结果按剩余的排序列排序

The easiest one is to have that view sorted in the second column too. No extra code required. You can have multiple sorted columns which don't need to be adjacent. Then you can have better filter keys. E.g you have 4 sorted columns: you use an array with 1-4 elements as filter. With 1 element it filters on the first column. With 2 elements it filters on the first and second column etc. The results are returned sorted by the remaining sorted columns

这篇关于XPage - 对过滤视图进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆