it doesnt assume anything, it tries to be as lenient as possible

so if your size() suggests that there should be 5 entries on this page, but your iterator only returns 3 - only 3 will be displayed w/out any errors. also if your iterator returns 7 then still only 5 are shown.

-Igor


On 3/24/06, Frank Silbermann <[EMAIL PROTECTED]> wrote:

That suggests to me that the implementation might assume it always gets all the rows it asks for, and may raise an exception otherwise.  Is that correct?

 

If so, then any change in the number of rows between displays requires not merely that the DataTable page be reset to 1 (assuming page headers), but that the whole DataTable should be replaced for each response if the data is not static.  Was that the intent?

 

If DataTable assumes that the number of rows is static, and if the implementers assumed that in the usual case "IDataProvider.iterate(first,count)" would go to the database each time rather than storing data, then isn't there a danger that the total size will change while paging through the data – as other users insert and delete while one traverses the DataTable pages?

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:41 AM
To: [email protected]
Subject: Re: [Wicket-user] ?Contract for "Iterator IDataProvider.iterator(int first, int count)" ???

 

the implementation will trim to size()

-Igor

On 3/24/06, Frank Silbermann < [EMAIL PROTECTED] > wrote:

 

To use the Wicket-extensions 1.2 DataTable, we must provide an implementation of IDataProvider.

 

IDataProvider , in turn, requires that we implement

 

"int size()"

and

 "Iterator iterator(int first, int count)"

 

If the DataTable is paging data, is it likely that "count" on the last page will be larger than the result determined by "size()" – so that we must return "count" rows or however many remain, whichever is less -- or does the DataTable reduce "count" on the last page so that "first + count" never exceeds "size()"?

 

 

 


Reply via email to