-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
So I'm using ZK in JSP pages. The page I'm working on is made with both HTML and ZK tag (provided by Taglib). The page was created, and worked well, without ZK, and what I'm trying is just to use ZK's component, but keeping the structure of the page, made by HTML tag (based on tables).
The issue is that I've got performance troubles. My page currently has a portallayout, with 4 panels inside, and around 20 components (datebox, textbox and combobox filled with DataBase). And everything is really slow (collapsing panel, loading page, autocompleting, ...).
So I want to know what's the reason for that, and try to fix it. Is it possible that the mix between ZK and HTML's tag is at the bottom of the problems ? Or the fact that I am in a JSP page ?
Thanks.
Mako
Edit: IE 6
ZK 3.6.4
ZK JSPTag 1.4
Another problem is that I have combobox filled with DataBase, and there are lot's of elements (up to 10.000). I think that I'm currently loading everything at the beginning, which would explain why that's so long...Could anyone help me on that ?
The code I use :
<zscript> ArrayList listCdp = (ArrayList) session.getAttribute("listCdp"); </zscript> ... <combobox model="@{listCdp}" autodrop="true" width="90%" tabindex="14"> <comboitem self="@{each='cdp'}" label="@{cdp.label}" value="@{cdp.value}"> </combobox>
By the way, I can't find how the 'value' attribute of comboitem is renderer in the HTML page, does anyone know ?
Thanks.
Mako
search for paging
@terrytornado :
I've found that page : paging, this is definitely what I was looking for, but they are not using databinding, neither combobox, so I've got some difficulties to apply it to my case. Could you help me doing that ?
@SimonPai :
Once again, that's an example based on grid...Moreover, that's a little bit too complex for me. Do I have to create my own class ? I mean, there isn't any easy way to do that ?
Thanks both for your response.
Mako
search for databinding and combobox. You will find some threads about that.
I prefer automatically databinding only for single properties of a bean!
For listbox, grid, combobox, all what uses a list/set/collection or what else i use the java code way.
Look at the sample page from Robert for databinding samples: http://www.pichelhofer.at/ZKDemo/
best
Stephan
The problem I have is not for the databinding part, because that works well. But what I want, is loading only the elements displayed by the combobox, not all of them.
In the code I post above, listCdp is a list of LabelValueBean which are around 10.000. I just want to load the 10 or 20 items which are currently seen by the user. I have to add that I can't modify the way I'm working (using listCdp, etc.) because I'm working on an application which already exists, and is used.
Mako
Hmmmmm, i use for such a case a bandbox with a paged listbox and a search field in it.
Have a look on the 'orders' menu point in the Zksample2. There is such a thing to search/select a customer from a list.
Can this help you?
best
Sephan
You can checkout the project codes as runing eclipse projects.
controller: 'de.forsthaus.webui.order.OrderListCtrl.java'
component: Bandbox 'bandbox_OrderList_CustomerSearch'
zul: WEB-INF/pages/order/orderList.zul
best
Stephan
I finally manage to run the example, so I could have a look at the bandbox your talking about. What's bothering me is that there's still a paging in your bandpopup (for the grid). Is it possible to make a listbox with a scroll bar, while still loading only the displayed elements ?
Mako
Asked: 2010-04-19 10:02:45 +0800
Seen: 2,885 times
Last updated: Apr 23 '10