Rick,

The components provided by the core wicket project are pretty basic in
what they can accomplish out of the box. For your particular problem
there are several options.

One of them, which is very elegant if I may say so, are the repeaters
in the Wicket extensions project. You can see them in action in the
repeaters example. They use an IDataProvider that has two methods: one
for getting the count, and one for getting a paginated iterator
retrieving the results for the actual page rendered.

The extensions project provides the DataView, which is an extension on
the ListView that knows how to deal with the IDataProvider directly.
There are more powerful options, such as sorting and other neat
things.

In our own application we only use DataViews now.

The other option is to bake a solution yourself or try the
wicket-contrib-data and wicket-contrib-data-hibernate3 jar files.
However I think they have been superseeded with the repeater package
in wicket-extensions.

Martijn


On 1/23/06, Rick Reumann <[EMAIL PROTECTED]> wrote:
> I was looking at the Library example and I noticed it uses a
> PageableListView added to a PagingNavigator to display the List of
> books. In this case all the books are being populated from a single
> List.
>
> How do you handle the cases where you need pagation, but each request
> for a new page should go out o the server and get the new list. I
> don't like the idea of having to store potentially thousands and
> thousands of rows of data into a List just to create a sortable list.
> (I understand one initial query is needed just to get the overall size
> of the result set to create the page numbers, but that's a big
> difference in overhead vs having to populate all the potential objects
> from that query). To handle this in Wicket, would someone need to
> write a new component to satisfy this business need or can it be done
> using some standard iterating tag (similar to JSTL's forEach) and
> straight HTML?
>
> I'm new to using Wicket and still new to JSF as well, but I find the
> whole component type of architecture a mixed blessing. For simple
> stuff it's nice to have some out-of-the-box display features coded for
> you, but when you end up having to customize, I often find a pain. I
> know HTML and JSTL so coding my front end with simple JSTL and HTML is
> easy. It's a shame that it seems like these component based frameworks
> require you to work within the components to achieve what you want.
>
> For example, in JSF I was wanting to display a bunch of stuff in divs
> as I iterated over a collection. With standard JSTL and HMTL this is a
> piece of cake, but in JSF I couldn't even find a component to let me
> do this. Everyone said use the DataTable, but it didn't provide the
> functionality I needed.
>
> Thanks for any feedback.
>
>
> --
> Rick
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to