I haven't used the grid with flash persistence, so I cannot comment on that.
But I just want to let you know that you can control the behavior of @Persist inside the Grid using "Persistence Strategy Inheritance" ( http://tapestry.apache.org/persistent-page-data.html ) without having to alter the component itself. -- Chris On Mon, May 2, 2016 at 11:12 AM, Davide Vecchi <d...@amc.dk> wrote: > Hi everybody > > I see that the instance field that holds the current page number of a grid > (org.apache.tapestry5.corelib.components.Grid.currentPage) is annotated > with @Persist . > > This has the probably desirable effect that f.ex. if I am on webpage A and > it has a grid and I browse to its page #2 and then I go to another webpage > and then I go back to webpage A its grid is still on its page #2 where I > had left it. > > However in my case this is not desirable and I would prefer that the grid > page number is not remembered across different webpages. > > Removing the @Persist annotation of Grid.currentPage instance field > altogether would cause the impossibility to browse grid pages at all > because the grid pager does a page reload and this loses the currentPage > value, but persisting that value just until the next request - to preserve > that value during the page reload - seems to work fine: I changed the > annotation from > > @Persist > > to > > @Persist(PersistenceConstants.FLASH) > > and I'm testing my pages to make sure this works. However I am also > wondering if in theory changing that persistency to flash might be a bad > idea for reasons that I don't know and that my tests so far are not > showing. Does anyone have any opinion about this ? >