-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I'm looking for any input on how best to allow for reordering items in a list. The only way I've done it in the past (with my own framework) is with a select list (drop down) with numbers 1..x. When you change the select list, the page is posted and items are reordered. There must be a more elegant way to do this in Zk. Drag and Drop seems obvious, but this might be troublesome for long lists that scroll/page. Any feedback?
/Daryl
I can give you some key words.
First, you can google "ZK ListModel" series and "ZK ListitemRenderer".
And if you also want to know how to partially render big collections of data, please google "zk livedata" & "zk paging".
Finally if you just want to sort the items in Listbox, please read Listbox's Javadoc.
Sorry, maybe I wasn't clear. I have a collection of things in the database. The table has a column "presentationOrder" that I use to order by when showing the items in lists, reports, etc. In the administration interface, I want to allow the presentationOrder to be changed. One idea is to allow the administrator to edit an Intbox that binds to presentationOrder. Another is the idea above. Another is up/down arrows on each row used to push an item one position. I'm wondering how other folks do it.
/Daryl
Asked: 2009-01-21 21:48:53 +0800
Seen: 341 times
Last updated: Jan 22 '09