I did, they are the same. Although modulating tolerates a glitch I'm trying
to understand why is it happening. I have 20 rows per page. The thing is
that, sometimes, the passed index to the getRowValue method is like 0,
while the startindex is 20 !

On Mon, Dec 17, 2012 at 12:00 AM, Geoff Callender <
geoff.callender.jumpst...@gmail.com> wrote:

> On 17/12/2012, at 3:10 AM, Muhammad Gelbana wrote:
>
> > Marvelous ! You deserve a medal or something :D
> > Although I know "jumpstart" is a very resourceful project for tapestry
> > beginners including me, I don't why I keep forgetting about it ! May be I
> > should have it as my homepage instead of google ehehe
> >
> > About the getRowValue(int) method:
> >
> > preparedResults.get(index - startIndex);
> >
> >
> > You think this should work too ?
> >
> > preparedResults.get(index % rowsPerPage);
> >
> >
> > I think both would have the same result.
>
> Try it. I think you'll find the answer is no.
>
> > On Sun, Dec 16, 2012 at 2:15 PM, Geoff Callender <
> > geoff.callender.jumpst...@gmail.com> wrote:
> >
> >> Newly added: a working example using GridDataSource here:
> >>
> >>
> >>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources
> >>
> >> Cheers,
> >>
> >> Geoff
> >>
> >> On 15/12/2012, at 2:46 AM, Lance Java wrote:
> >>
> >>> Basically, the prepare() method is used to fetch the rows between
> >> startIndex
> >>> and endIndex in a single batch and cache them. This cache might be a
> list
> >>> with indexes ranging from 0 to (endIndex - startIndex)
> >>>
> >>> getRowValue(int index) is then used to retrieve a single entry from the
> >>> batch. This might require you to subtract startIndex from index to get
> a
> >>> suitable index into your cached batch of records.
> >>>
> >>> getAvailableRows() can be a dynamic value over time. Just make sure you
> >>> return null from getRowValue() if the index is out of range (ie a row
> has
> >>> been deleted).
> >>>
> >>>
> >>>
> >>> --
> >>> View this message in context:
> >>
> http://tapestry.1045711.n5.nabble.com/5-3-6-GridDataSource-provided-row-index-to-getRowValue-int-tp5718694p5718727.html
> >>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >>> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to