I have just released new addon called
LazyList . It is a UI component which has other components inside it. The LazyList is scrollable and the components inside it are placed vertically. When the user scrolls to the end of the list, the LazyList tries to fetch more components from the server side. This pattern is commonly used especially in mobile applications.
The addon is still “experimental” as only the most important feature is implemented. The next thing would be to add support for refreshing the list when user scrolls up to the list. Also I’m planning to support Android devices as well (might work already but not tested)
All the feedback, feature or API suggestions and bug reports are welcome.
this seems like an excellent component and seems to work quite well. One thing I noticed (on Firefox/OSX) is that when you scroll all the way down and it shows the loading bar at the bottom, the scroll position changes slightly when the loading is finished - it scrolls a few items down. It could be due to some scroll events being triggered after the loading for new items has already started, and then the scrolling is executed once there is more items to scroll. I’m not sure if this is avoidable but perhaps you could cancel the scroll events during loading and rendering new items.
Hi all.
I’m pretty new to java and i need some help with lazy list.
After implementing the foolwing method:
LazyItemFetcher itemFetcher = new LazyItemFetcher() {
@Override
public List<Component> getMoreItems() {
List<Component> res = new LinkedList<Component>();
for (Component c: comp)
res.add(c);
return res;
}
};
final LazyList questionLazyList = new LazyList(itemFetcher);
questionLazyList.setSizeFull();
layout.addComponent(questionLazyList);
What i see in my portlet is the list of components I created and the loader.
Can someone please tell me in what I’m wrong or plase show me some implemented statement exaple?
I appreciate any help. Thank you
I am implementing Multi Select using this LazyList like how we use ListSelect for selecting one or moren items.
Eg:ListSelect.setMultiSelect(true).
Can i implement the same with LazyList also.Is there any another solution.
Thanks for the feedback. There was an issue in the addon that it didn’t hide the spinner if no more items were found. The version 0.0.2 should fix that.
Mahi, LazyList is not designed to be an selection component itself like, for example, ListSelect, ComboBox and Tables are. Anyway, it’s doable by adding click listeners to your components and keep track yourself which components are currently selected. The Vaadin data model cannot be used though like with ListSelect.
Iam trying to implement ListSelect like a table using Lazy Query Container.
Is this the appropriate one or not.
I am facing an issue because Internet Explorer is not responding to load a ListSelect having tens thousands of data.
How to implement Lazy Loading for List Select.