OegyScroll (or org.laughingpanda.LazyLoadScrollableList) is a Wicket component for displaying long lists of data in a scrollable view. The idea is that at first only the first 100 rows are loaded to the browser and more rows are loaded while you scroll. This way a list of 20000 items can easily be shown in a browser, because the initial markup of the page contains only some hundreds of elements. Still, the page behaves as if all the data was loaded immediately. The user can freely scroll through the data and will only experience a short delay before the actual data appears.
New: JQuery client-side library
Using the client-side library, you can enjoy OegyScrolling without Wicket, too. Have a look at this humble demo page to get the idea!
How To Install It?
If you're using Maven 2, just add the following dependency block into your POM file:
<code> <dependency> <groupId>org.laughingpanda.oegyscroll</groupId> <artifactId>oegyscroll</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </code>
..or you can just clone the source and build it yourself.
- Wicket 1.4 (can easily be backported to 1.3.x)
- Tested on Firefox 3.0, IE 6.0, IE 7.0
How To Use It?
Like with DataView, you have to override the populateRow method where you add the components for each actual data row.
You need some custom HTML in your markup too, where you specify the markup for the placeholders and the data rows. You should use CSS styles to ensure that the height of the placeholder equals row height times block size.
Please have a look at the OegyScroll demo and I'm sure you'll get the idea. If you do a full checkout of OegyScroll, you'll also get the runnable demo, which has a "run" script for running it in Jetty.
How Does It Work?
- Juha Paananen
- Antti Viljakainen
- Github: https://github.com/reaktor/oegyscroll
Copyright © 2009 original author or authors
OegyScroll is Licensed under the Apache License, Version 2.0.