-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi.
I need to have the load-on-demand feature like the listbox in my combobox.
Listbox load-on-demand
And I don't want to use the bandbox sample :
bandbox as combo box
I know the autocomplete feature and the ListModels.toListSubModel list model that loads only some of the items.
but this is not enough.
Hi
I think my question has no enough details.
I have a combo box that its data count is over 1000 items.
so for loading the page, it takes a lot of resource of the client.
the combo items, are provided by a ListModelList.
when I open the combo, it takes a lot of time to open, and some times the browser hangs and I have to close it.
so I need a way to load the items partially, not all at once.
I tried the autocomplete feature and the ListModels.toListSubModel but my problem is that in this way, the combo only loads 15 items at once, and I can not see the other items.
I need a way that tells the combo load 15 items (for example) at once, and if the user scrolls down, load the next items.
the examples that I found in the ZK demo are not what i need.
in both of them I can not use the combobox component, but I need to use it.
so any idea?!
I have a feature request to add a setter for data in SimpleListModel, i.e. this field:
private final Object[] _data;
I think it might be relevant in your case, too. http://tracker.zkoss.org/browse/ZK-795
Hi Richard
I red the links, but my problem is not fetching the data. I don't need to fetch the data in pages.
As I mentioned before, the "ListModels.toListSubModel " works fine, but the problem is that the solution is linited in items count, and I need to load more data when scrolling down or up.
THX
Hi
if you use ZK EE version, Combobox won't create comboitem when loading page, so the loading time is short
I tested it use the code below
<window title="Test" border="normal"> <zscript><![CDATA[ List strset = new ArrayList(); for (int i = 0; i < 1000; i++) { strset.add("" + i); } ]]></zscript> <combobox> <comboitem label="item ${forEachStatus.index}" forEach="${strset}"></comboitem> </combobox> </window>
it will create comboitem when user click the combobox's button
Asked: 2012-01-25 12:11:26 +0800
Seen: 463 times
Last updated: Feb 16 '12