0

grid.setModel(simpleListModel(list)) changes the initial order

asked 2012-05-24 11:14:45 +0800

javaenthu gravatar image javaenthu
141 2

Hi folks,
In the composer layer I am setting the model like following:

userDataGrid.setModel(new SimpleListModel(new LinkedList(usersList)));

userList is instance of ArrayList and it contains the UserVO objects. This usersList is already sorted, while I am setting this to grid, I see all the results but not in the required order.

Can any one tell is it a bug in ZK or am I missing something?


Thanks in advance.
-JE

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2012-05-24 11:54:42 +0800

javaenthu gravatar image javaenthu
141 2

updated 2012-05-24 12:39:33 +0800

Instead of SimpleListModel I tried with ListModelList also I am facing the same issue.
When I debug and check "userDataGrid" in the composer layer I see the list is retained in the correct order.
Any ideas if I am missing something?

link publish delete flag offensive edit

answered 2012-08-17 04:18:35 +0800

hawk gravatar image hawk
2295 1 5
http://hawkphoenix.blogsp... ZK Team

Hi,
I have not encounter this issue.
I think you can pass usersList directly to SimpleListModel's constructor without wrapping with LinkedList first:


new SimpleListModel(usersList)

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: 2012-05-24 11:14:45 +0800

Seen: 132 times

Last updated: Aug 17 '12

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