wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucio Crusca <lu...@sulweb.org>
Subject Re: DataTable multiple sort columns
Date Tue, 30 Apr 2013 17:44:38 GMT
In data Tuesday 30 April 2013 19:14:12, Jesse Long ha scritto:
> Hi Lucio,
> 
> Its something I'd be interested in pursuing myself, but the real problem
> is how to display the sort state to the user. 

How about this?

<ascii-art font="monospaced">

|         |        ^ |         ^ |               |
| Name  2 | Color  3 | Price     | Available   1 |
|       v |          |         v |             v |

</ascii-art>


That would mean the primary sorting is by availability descending (1), then by 
name (2) descending and finally by color (3) ascending. Price is unsorted. 
Clicking a column, instead of only toggling direction, could switch between 
ascending, descending and unsorted. Clicking unsorted columns could make them 
be the primary sort column and shift other sort columns priority by 1.

A more intuitive alternative would be to make the single arrows clickable, in 
addition to columns names, and clicking columns names would only toggle 
between sorted/unsorted states, with unsorted->sorted transition moving the 
column to the primary sort criteria as above.

Would it be hard to obtain that with current wicket components?

> You could use a Palette type component as a top toolbar, allowing the
> user to add from available columns in the left to the sort columns in
> the right, and sort them in the order that they were added to the right
> hand side of the palette.

That's another way to do it. I don't like it very much to be honest, but I 
guess it's only a matter of taste.

> You dont need to use SortableDataProvider (which supports
> SingleSortState), you can use any subclass of ISortableDataProvider and
> you can support whatever ISortState you want.

Thanks for the hint, I hadn't realized that before.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message