File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes two level sorting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "two level sorting" Watch "two level sorting" New topic

two level sorting

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33134

On a web app, it is common to allow sorting of a table by clicking on something in the column header. It then shows whether the column is sorted ascendingly/descendingly.

Has anyone seen two levels of sorting? I'm trying to determine if there are any standards or common conventions for this. For example, I would want to be able to sort by authors and then sort by titles if there were two or more books by the same author. It would be possible to do this for any combination of two columns. So it's either two levels of sorting or sticky sorting.

My thoughts are that you would have to either stick something else in the column header or provide two pull downs to select the columns from. I suspect shoving more in the column header will make it crowded and hard to use.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Yeah, there is no friendly way of showing sorting. In one application I wored on, there was a options pane that would slide open and let the ueser arrange the columns and the sort would be doe with thise. Basically a list with up down arrows.

Another app I saw used the up down arrows with numbers in them, made no sense to me when I first saw it.

I have seen ones where you do the control click and it would sort columns.

I say try to find out what makes sense to the user.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33134

Originally posted by Eric Pascarello:
Yeah, there is no friendly way of showing sorting.

Thanks Eric. I didn't find anything after a lot of searching, so I feel more comfortable when you say there isn't some standard I'm missing.

I have a couple things to propose: two pull downs, check box at the bottom to make sorting sticky. We'll create prototypes and show them to the users. I wanted to check here first because once you give the users a choice, you have to go with it. And I didn't want to give them a non-standard choice and be stuck with it forever.
I agree. Here's the link:
subject: two level sorting
jQuery in Action, 3rd edition