Hello,

I try to understand the DataTableFilterToolbarPage. In Versin 6.21 and 6.22. I 
have 2 problems :

  *   If I use the date filter to get 2 anwsers, I got exception.
  *   If I suppress the exception (see the following paragraph), the "Pager" is 
not updated. So I have the 2 answer on the first page, but the "pager" says : 
Value from 1 to 8 / 50 and of course there are 7 links. Of course, goto page 2 
will throw an exception.


How to suppress the exception ?

public Iterator<Contact> iterator(long first, long count)
    {
        List<Contact> contactsFound = getContactsDB().getIndex(getSort());

        return filterContacts(contactsFound).
            subList((int)first, (int)(first + count)).
            iterator();
    }


If the sublist is < 8, then there is an exception on the first page. In fact 
the first page is not send because there is an exception.


So, I replace the size of the sublist by;

x = filterContacts(contactsFound) ;

return x.subList((int)first, Math.min((int)(first + count),x.size()).iterator();


if size of filterContacts(contactsFound) is 4, it is not possible to return a 
sublist form 1 to 8.


Questions

=========

  *   Why does the on line example working ?
  *   Is my correction good or do I miss something ?
  *   How to update the "pager" information, that is how to replace the initial 
list of 50 items, by a list of 2 items (or 0 items).

Thanks,

PHL;



Reply via email to