If we do add an exception we will be on the other side of the fence, the
user now HAS to handle it. Personally, I wouldn't want to have a try catch
block everytime I have a dataview for something that can be handled for me
automatically. What else would you do inside that catch block other then
redirect to first or last page?

Last time I checked setStartIndex() is public so you are more then welcome
to override it.

Public setStartIndex(int index) {
         if (index<0||index>==getItemCount()) {
                throw new IndexOutOfBoundsException();
        }
        super.setStartIndex(index);
}

-Igor


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Gili
> Sent: Tuesday, August 16, 2005 2:05 PM
> To: [email protected]
> Subject: [Wicket-user] RE: DataView.setStartIndex() (Igor Vaynberg)
> 
> > Im not sure this is a good idea. For example, when using 
> > pageabledataview lets say at the time of request 1 you have 
> 4 pages so 
> > the navigator will draw 4 links, use clicks page 4 and at that time 
> > there are only 3 pages because some rows were deleted. In this 
> > situation would you like to deal with the exception or just let the 
> > listview default back to first page and only draw 3 
> navigation links? 
> > When the new navigation is done we can make it smarter and 
> based on the index default ot the first or last page.
> 
>       Well, if the user wishes to catch the exception and 
> redirect to index zero instead that's his choice to make but 
> right now we're not even giving people the choice.
> 
> Gili
> 
> 
> -------------------------------------------------------
> 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
> 
> 
> 




-------------------------------------------------------
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

Reply via email to