You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jesper Zedlitz <jz...@informatik.uni-kiel.de> on 2008/03/02 11:47:11 UTC

how do I reset a Grid (displayed page and sort column)

Maybe it is a FAQ and I just did not know the good search terms to find the
solution...

I have a couple of lists with identification numbers. The lists contain
entries that are displayed using a Grid. The page ShowEntries has a method
onActivate(int id) to get the id from the request. A getEntries() method in
that page returns the entries. When I load the page the first time via
/myapp/showentries/1
these methods are invoked:
onActivate
getEntries
GridDataSource.getAvailableRows
GridDataSource.prepare  (entries 0-19, objects per page is 20)
GridDataSource.getAvailableRows (4x)
GridDataSource.getRowValue (n times)

on chaning to a different page of the table (the 3rd in this example)
onActivate
onActivate
getEntries
GridDataSource.getAvailableRows
GridDataSource.prepare 40-59
GridDataSource.getAvailableRows (4x)
GridDataSource.getRowValue (n times)

So far so good. Now I want to load a different list
/myapp/showentries/2
But the previous selected page of the table (and the sort column) is
displayed instead of the first page.

How do start the new request on the first page with a defined sort column?

Jesper

-- 
Jesper Zedlitz                   Dept. for Computer Science, CAU of Kiel
Room 1108                        Communication Systems Research Group
                                 Phone:    +49-(0)431-880-7279
Christian-Albrechts-Platz 4      Fax:      +49-(0)431-880-7615
24098 Kiel - Germany             jze@informatik.uni-kiel.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: how do I reset a Grid (displayed page and sort column)

Posted by Howard Lewis Ship <hl...@gmail.com>.
There isn't an API for that currently (especially after I stripped out
the accessors in favor of the @GenerateAccessors annotation).

I believe a simple reset() method on Grid would do what you want.

Please add a request into JIRA.

On Sun, Mar 2, 2008 at 2:47 AM, Jesper Zedlitz
<jz...@informatik.uni-kiel.de> wrote:
> Maybe it is a FAQ and I just did not know the good search terms to find the
>  solution...
>
>  I have a couple of lists with identification numbers. The lists contain
>  entries that are displayed using a Grid. The page ShowEntries has a method
>  onActivate(int id) to get the id from the request. A getEntries() method in
>  that page returns the entries. When I load the page the first time via
>  /myapp/showentries/1
>  these methods are invoked:
>  onActivate
>  getEntries
>  GridDataSource.getAvailableRows
>  GridDataSource.prepare  (entries 0-19, objects per page is 20)
>  GridDataSource.getAvailableRows (4x)
>  GridDataSource.getRowValue (n times)
>
>  on chaning to a different page of the table (the 3rd in this example)
>  onActivate
>  onActivate
>  getEntries
>  GridDataSource.getAvailableRows
>  GridDataSource.prepare 40-59
>  GridDataSource.getAvailableRows (4x)
>  GridDataSource.getRowValue (n times)
>
>  So far so good. Now I want to load a different list
>  /myapp/showentries/2
>  But the previous selected page of the table (and the sort column) is
>  displayed instead of the first page.
>
>  How do start the new request on the first page with a defined sort column?
>
>  Jesper
>
>  --
>  Jesper Zedlitz                   Dept. for Computer Science, CAU of Kiel
>  Room 1108                        Communication Systems Research Group
>                                  Phone:    +49-(0)431-880-7279
>  Christian-Albrechts-Platz 4      Fax:      +49-(0)431-880-7615
>  24098 Kiel - Germany             jze@informatik.uni-kiel.de
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org