English 中文(简体)
缩略语
原标题:JSP: sort HTML table on serverside
  • 时间:2011-04-20 20:45:47
  •  标签:
  • jsp
  • sorting

我正在研究一项遗产申请。 在联合材料中,有一份html表。 我需要书写功能,根据用户点击的一栏对表格进行分类。

表格显示每页有20个浏览点。 一些表格有3 000个行。 因此,可能约有150页。 每页数点击时,便打电话,接下行。 因此,每次点击都是一项新的请求。

我的问题是:当页显示时,各栏按违约顺序排列。 下点击该栏,应将其降级(所有3 000个行)和 vice。 大约有10栏可以分类数据。 我如何能够这样做。

问题回答

各种物体很容易分类:你创建一种习俗<代码>Comparator,根据构造参数比较不同的领域。 然后,请打电话<代码>Arrays.sort(),通过你的阵列和你的习惯比较器。 http://download.oracle.com/javase/tutorial/collections/interfaces/order.html“rel=“nofollow”http://download.oracle.com/javase/tutorial/collections/interfaces/order.html。

为了确定实地情况,你只是通过请求参数。 您构建了表格,使每名负责人都有一份<编码>onClick的活动,以特定参数发出新的请求(如果确定有更现代的方法,其他人可以回答)。

但是,如果你说这些阵列被储存为request/em>属性,那么你将不做任何工作。 你们是否相信它不会被储存为session属性?





相关问题
How do I sort enum members alphabetically in Java?

I have an enum class like the following: public enum Letter { OMEGA_LETTER("Omega"), GAMMA_LETTER("Gamma"), BETA_LETTER("Beta"), ALPHA_LETTER("Alpha"), private final String ...

Grokking Timsort

There s a (relatively) new sort on the block called Timsort. It s been used as Python s list.sort, and is now going to be the new Array.sort in Java 7. There s some documentation and a tiny Wikipedia ...

Sorting twodimensional Array in AS3

So, i have a two-dimensional Array of ID s and vote count - voteArray[i][0] = ID, voteArray[i][1] = vote count I want the top 3 voted items to be displayed in different colors, so i have a 2nd Array -...

Linq operations against a List of Hashtables?

I m working with a set of legacy DAO code that returns an IList, where each Hashtable represents the row of a dynamically executed SQL query. For example, the List might contain the following records/...

C++ Array Sort Me

Stuck on an array sorter. Have to sort numbers from largest to smallest. I m trying two loops (one nested in the other). Here s the code: int counter=0; // inner counter int counter2=0; // outer ...

Can I Nest OrderBy in .NET?

This doesn t seem to work as I intend. VB.NET: Dim x = Model.Discussions.OrderByDescending(Function(d) d.Messages.OrderByDescending(Function(m) m.Sent).First.Sent) For Each d As Discussion In x ....

sorting elements javascript

I m looking for a way to sort my elements, but it isn t as easy as it sounds. Please let me explain My elements are grouped per 6 elements (thumbnails), each x represents a thumbnail However all ...

热门标签