Quick question about DataView...

My assumption is that when using DataView with IDataProvider, when the
number of items per page is set with 

  setItemsPerPage( 20 );

This will cause data to be populated with a call to (for example for the
first page):

  IDataProvider.iterator( 0, 20 )

And the appropriate Iterator is returned.


Is this not correct? (I assume it is, because this worked for me until I
updated to 1.2).

In my case, I noticed that I keep getting "0" fed into
IDataProvider.iterator as the value for "count".

Is my assumption wrong, or did something change very recently?

Is there anything else that can cause "count" to be set to "0"?



More concretely, in my Page:

  final DataView articleDataView = 
      new DataView( "articleList", m_articleListProvider )
  {
      protected void populateItem( final Item item )
      {
          doStuff();
      }
  };

  articleDataView.setEnabled( true );
  articleDataView.setItemsPerPage( 20 );
  add( articleDataView );
  final PagingNavigator nav = 
      new PagingNavigator( "articleList.navigator", articleDataView );
  add( nav );


.. and in my IDataProvider object ( ArticleListProvider() ):

  public Iterator iterator( final int first, int count )
  {
      getDataIterator( first, count );
      // --> but "count" is always "0", so an empty list gets fed back!
  }





-------------------------------------------------------
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&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to