0

Guaranteed order of children

asked 2010-09-01 07:00:20 +0800

diego898 gravatar image diego898
246 3

Hello,

I have a listbox where the rows are drag and drop. Order is important in my application so is there a way I can get the children of this listbox while guaranteed that their order is the same as it was in the dialog?

Thanks!

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-09-01 19:59:43 +0800

SimonPai gravatar image SimonPai
1696 1

Hi diego898,

Could you elaborate your question further? Have you run into a consequence that the list retreived by getChildren() has a different order than what you see on the browser?

Regards,
Simon

link publish delete flag offensive edit

answered 2010-09-02 04:41:50 +0800

diego898 gravatar image diego898
246 3

I have not, but I dont suspect it is guaranteed unless it is implemented with an arrayList or linkedList or some other implementation with guaranteed ordering

Thanks

link publish delete flag offensive edit

answered 2010-09-02 20:20:41 +0800

SimonPai gravatar image SimonPai
1696 1

Hi diego898,

I think all type of Lists are order preserving in Java. If you are interested to see how ZK implements Listbox#getChildren(), you can trace the source code. You will see it returns a class that extends AbstractSequentialList.

Regards,
Simon

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: 2010-09-01 07:00:20 +0800

Seen: 233 times

Last updated: Sep 02 '10

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