0

Drag and Drop Reorder List

asked 2009-01-21 21:48:53 +0800

dastultz gravatar image dastultz
797 8

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

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-01-22 11:24:59 +0800

dastultz gravatar image dastultz
797 8

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

link publish delete flag offensive edit

answered 2009-01-22 02:56:45 +0800

iantsai gravatar image iantsai
2755 1

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-01-21 21:48:53 +0800

Seen: 339 times

Last updated: Jan 22 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More