I don't really see the problem with going over....
Your navigator shows 20 pages. You click on page 20 and the next thing you
know the navigator is only showing 19 pages and 19th is selected....whats
the problem?

Onclick() { navigator.setpage(20) -> dataview.setpage(20) (sets to 19) }
Onrender() { navigator.getpage() { dataview.getpage() (returns 19) } 

Everything is in sync so whats set in the dataview is always shown in the
navigator.

-Igor
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Christian Essl
> Sent: Saturday, August 20, 2005 2:41 AM
> To: [email protected]
> Subject: Re: [Wicket-user] Re: ColumnedDataProvider 
> startIndex problems
> 
> Oh yes you are right. I did not think of that the currentPage 
> does not get listed anymore. Maybe change the 
> IPageable.setCurrentPage() to setWantedPage(). IMO this 
> reflects more what it realy does than.
> 
> I think there should be someway the user can influence how 
> the bounding is done. Maybe a protected method on DataView.
> 
> Before I was trying to push the work over to the navigator. 
> In terms of
> getPageCount() the navigator is as acurate as the DataView 
> itself. So it could do the bounding just before setting the 
> currentpage and if it sets it higher it should take care to 
> show the label somehow. Not realy nice.
> 
> IMO I think we will not get around a sometimes empty list, 
> because the real exact data-size can only be determined after 
> the data is gotten from the iterator. You generaly do not 
> execute the size select and data select in a serialized transaction.
> 
> And than there are some stupid guys like me who sometimes do 
> not do size selects at all and just show ie the first 5 pages 
> and hope that the user is clever enough to not press next 
> anymore after this 5 pages if nothing is on the page.
> 
> Christian
> 
> On Sat, 20 Aug 2005 08:47:55 +0200, Johan Compagner 
> <[EMAIL PROTECTED]>
> wrote:
> 
> > hmm i don't know about this.
> > Because the DataView is the one that gives the total pagecount. The 
> > navigator just uses it.
> > And if the navigator sets a page that is suddenly out of 
> range then 2 
> > things can be done:
> >
> > Math.min(wantedPageCount,maxPageCount)
> >
> > or if(wantedPageCount > maxPageCount) wantedPage = 0
> >
> > because the view you get in the browser is very strange.
> > You see nothing in the list, You don't see any selection in the 
> > navigator (because the 'currentpage' isn't listed anymore)
> >
> > I prefer to go the the last page. Because it wanted to show 
> data that 
> > was further on.
> >
> > johan
> >
> >
> > Christian Essl wrote:
> >> I do not know about ListView, but I think DataView and 
> >> PagableDataView could be merged quite easaly.
> >>
> >> It already has the data-set size and the rows-count per 
> page. All we 
> >> would need is to add a currentPage property and than we 
> just render 
> >> from the startIndex+offsetOfPage.
> >>
> >> On bounding: I think we should strictly adhear to the 
> navigator for 
> >> the current page property. If DataView is instructed to 
> show ie page 
> >> 7 and there is nothing anymore on page 7 than it should 
> just show nothing.
> >> The navigator should deal with that, it is the one who shows the 
> >> current page-label. Especially DataView should not do any more 
> >> bounding than Math.max(0,settedPage). That is because you 
> can realy 
> >> get some nasty bugs if a property value is set, than internally 
> >> changed in the setMethod and than not afterwards reread. 
> >> Alternatively we should at least throw an IndexOutOfBoundsEx.
> >>
> >> I think I'll (try to) implement Igor's Grid example as a Component 
> >> after the IPageable is stable and DataView/PagabelDataView 
> implements 
> >> it. I guess before this it is just redundant work and there is the 
> >> example which does with just one copy-paste the job very well.
> >>
> >> Christian
> >>
> >> On Fri, 19 Aug 2005 09:28:27 -0700, Igor Vaynberg 
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >>> I really like the idea of having a listview that shows 
> everything by 
> >>> default, and when you attach a pager to it it becomes 
> pageable. So 
> >>> something like irangepageable { getrowsperpage() setrowsperpage() 
> >>> getmaxrows() }But that's just me.
> >>>
> >>> Btw whats getmaxrows() is that getrowcount()?
> >>>
> >>> I don't see why the listview cannot have setrowsperpage() anyways 
> >>> which defaults to showing everything until used.
> >>>
> >>> -Igor
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: [EMAIL PROTECTED]
> >>>> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Johan 
> >>>> Compagner
> >>>> Sent: Friday, August 19, 2005 2:29 AM
> >>>> To: [email protected]
> >>>> Subject: Re: [Wicket-user] Re: ColumnedDataProvider startIndex 
> >>>> problems
> >>>>
> >>>>
> >>>> >
> >>>> >> Alternatively we should make an PageableOrderedRepeatingView.
> >>>> >>
> >>>> >
> >>>> > I want to wait for the new navigation to be done so we
> >>>> don't need to
> >>>> > have the regular - pageable pairs.
> >>>> >
> >>>> >
> >>>>
> >>>> I am currently inclined to keep this difference.
> >>>>
> >>>> Because now i have
> >>>>
> >>>> IPageable
> >>>> {
> >>>>     getCurrentPage();
> >>>>     setCurrentPage(int);
> >>>>     getPageCount();
> >>>> }
> >>>>
> >>>> and i think i will make this one:
> >>>>
> >>>> IRangePageable extends IPageable
> >>>> {
> >>>>     getRowsPerPage();
> >>>>     getMaxRows();
> >>>> }
> >>>>
> >>>> instead of
> >>>>
> >>>> IRangePageable extends IPageable
> >>>> {
> >>>>     setRowsPerPage(int);
> >>>>     getMaxRows();
> >>>> }
> >>>>
> >>>> i think setting the number of rows a page should display is a 
> >>>> property of the View that displays them Not something of the 
> >>>> Navigation/Navigator that is attached to it..
> >>>>
> >>>> But if others are more in for pushing the rows per page 
> instead of 
> >>>> pulling then i could change my mind.
> >>>>
> >>>> and ListView doesn't have to be a RangePageable it could also be 
> >>>> used to display a panel and that it is only a Pageable 
> So giving a 
> >>>> listview by default the RangePageable interface is also wrong.
> >>>> ListView could be directly an IPageable and PageableListView an 
> >>>> IRangePageable.
> >>>>
> >>>> looks that logical?
> >>>>
> >>>> johan
> >>>>
> >>>>
> >>>> johan
> >>>>
> >>>>
> >>>>
> >>>> -------------------------------------------------------
> >>>> 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
> >>
> >>
> >>
> >
> >
> > -------------------------------------------------------
> > 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
> 
> 
> 
> --
> 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
> 
> 
> 




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