Render on Demand ,Listbox doesn't work after a defined list size

asked 2014-10-13 08:07:27 +0800

nsharma gravatar image nsharma flag of India
917 1 11

updated 2014-10-14 13:12:31 +0800

Hi ,

I have been trying to implement Render on demand functionality on listbox. I added this listner to my class :

public class LazyListbox extends Listbox {
public void initialize() {
    addEventListener("onDataLoading", new EventListener() {

                public void onEvent(Event event) throws Exception {
                    DataLoadingEvent dataLoadingEvent = (DataLoadingEvent) event;
                    int offset = dataLoadingEvent.getOffset();
                    int limit = dataLoadingEvent.getLimit();

                    ListModel origModel = LazyListbox.this.getModel();

                    if (origModel instanceof RenderOnDemandListModel<?>) {
                        RenderOnDemandListModel<?> model = (RenderOnDemandListModel<?>) origModel ;
                        model.loadCache(offset + 1, offset + limit);

Every thing is working fine. and I was able to successfully implement this functionality.

Now the only problem I face is that after a certain list size(around 11,18,480) ,this event stops getting called. So when I Scroll down nothing happens. I think the Component(listbox in this case) is not able to send the AUrequest to server. I still don't know the reason why. If somebody is able to identify and have a solution for this please reply.

Thanks in advance.

delete flag offensive retag edit


in zk javacsript : ebody.scrollheight(listbox-body scroll height) becomes negative after 1118480 size. why?if anybody knows.

nsharma ( 2014-10-14 10:33:03 +0800 )edit

It stops working exactly after list size becomes greater than 1118480.

nsharma ( 2014-10-14 11:02:54 +0800 )edit

What browser are you using?

jimmyshiau ( 2014-10-15 02:23:29 +0800 )edit

I am using google chrome and yess in internet explorer it is working fine, But my application is browser independent,so they can use any of it. moreover it doesn't sound good to have these many items in one page, of course now i have managed to pull only 300 item at one time. It is just one scenerio

nsharma ( 2014-10-16 13:22:47 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-16 13:40:34 +0800

nsharma gravatar image nsharma flag of India
917 1 11

@jimmyshiau : As you are here can you help me in one more scenerio : I am using this event "onDataLoading" ,so when user scrolls down the list ,it fetches the next items and renders them to ui. but user eventually in process of scrolling down ,causes multiple scroll down events, so two time this "onDataLoading" event is called(it can be more than two depends on number of time user scrolled down on unrendered list) . This slows down the functionality. I just want to have the last scroll(latest offset values) to work.

and thanxx for your help. :)

link publish delete flag offensive edit
Your answer
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

1 follower



Asked: 2014-10-13 08:07:27 +0800

Seen: 25 times

Last updated: Oct 16 '14

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