0

Listbox as dropdown with sorting.

asked 2009-12-22 07:29:20 +0800

sanhaq gravatar image sanhaq
264 1 6

Hi All,
I am using a listbox as drop down

<listbox mold="select" rows="1" width="165px"
																	model="@{aModel.aList}"
																	<listitem value="@{aRecord}" self="@{each=aRecord}"
																		label="@{aRecord.name}" />

Now what I want is to display the drop down sorted in ascending order.
Apart from sorting the aList can I use an attribute of Listbox which will sort the data that will be displayed as label in the dropdown?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-12-22 19:31:46 +0800

joylo0122 gravatar image joylo0122
688 1
www.zkoss.org

updated 2009-12-22 22:14:06 +0800

@sanhaq

Hi sanhaq, seems no attribute on listbox can do this work now, you must sort it by your self.
There's two ways to sort it, one is sort by SQL(if you are using Database), another is to sort
it in itemRenderer.

/Joy

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-12-22 07:29:20 +0800

Seen: 376 times

Last updated: Dec 22 '09

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