# Listbox grouping & sorting in 6.5.0 [closed]

gganassin
540 6
http://www.hybris.com/

Dear all,

i've struggled for 2 days trying to reproduce the examples available in the docs, downloading the demo ones and checkin the forum but no way: there is something always missing or not updated or simply not working properly (even in zkoss.org/demo there are examples that are NOT working! - ex grid grouping model).

Following this one (http://books.zkoss.org/wiki/ZK_Developer's_Reference/MVC/Model/Groups_Model), i end up with a

SEVERE: >>java.lang.ArrayIndexOutOfBoundsException: 2
>>	at org.zkoss.zul.GroupsModelArray.getChild(GroupsModelArray.java:166)
>>	at org.zkoss.zul.impl.GroupsListModel.getElementAt(GroupsListModel.java:201)
>>	at org.zkoss.zul.Grid\$Renderer.render(Grid.java:1007)
>>	at org.zkoss.zul.Grid.renderItems(Grid.java:1116)
>>	at org.zkoss.zul.Grid.service(Grid.java:1620)
>>	at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:692)

And basically i'm able to group ONLY the first column... the others produce the following:

Is there anyone who has a simple (working) example of a listbox with grouping & sorting fulfilled with a List of beans and not with a tabular data array? So Model + Comparator + Renderer + zul...

Any tip, link or snippet is more than welcome!

Giovanni

delete retag edit

## 2 Replies

hawk
2255 1 5
http://hawkphoenix.blogsp...

Hi,
try this http://www.zkoss.org/zksandbox/#g5

gganassin
540 6
http://www.hybris.com/

Thanks for the link - however... it is not implementing the grouping & sorting features.

I saw that finally in the grouping model example got updated in MVVM way... and it works fine... so i'm done thanks!

I am curious to see if i will be able to port it somehow in MVC databinding... but at least i have an exit strategy thanks!