-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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,80,000) ,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.
2 | No.2 Revision |
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,80,000) 11,18,000) ,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.
3 | No.3 Revision |
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,000) 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.