Thanks Johan foor providing IPageable, it looks realy good.
I just tried to implement it and had a border-line question:
In case the list size is 0 should getPageCount() return 0 and
getCurrentPage() return -1. Or does getPageCount() have to always return
at least 1 and getCurrentPage() at least 0?.
To figure this out I was looking into PabeableListView, which implements:
int getPageCount(){
return ((getList().size() + rowsPerPage) - 1) / rowsPerPage;
}
First I think if rowsPerPage is 0 than this will throw an Exception.
Otherwise if list.size == 0 than it always returns 0. Ok. But than I think
the bounding in setCurrentPage() sets the currentPage either to 0 or -1
depending on the argument.
As said it is a border-line question and as such not so important, but a
clarifying word maybe in the javadoc of IPageable would help me.
Thanks,
Christian
--
Christian Essl
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user