You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by olip <ol...@googlemail.com> on 2010/07/28 12:06:08 UTC
Re: Saving state when changing grid pages
Hi everyone,
Just for the records I found a more simple solution for this without the
javascript stuff:
I also had problems that the pager did not update or jump to the new
row/page when
clicked on a page and all this packed in a hidden div.
your tml:
<div id="${hiddenDIVID}">
<t:gridpager currentPage="currPage"
rowsPerPage="literal:50" source="phenotypes"/>
<div t:id="theGrid" />
</div>
your java code (only relevant part):
@Component(parameters = {"source=phenotypes", "row=loopPhenotype",
"pagerPosition=literal:none"})
private Grid theGrid;
@Property
@Persist
private Integer currPage;
@SetupRender
public void setupRender() throws Exception{
//init for the first time
if(currPage==null) {
currPage=1;
}
theGrid.setCurrentPage(currPage);
//now every time a page reload occurs we point the grid to the page
theGrid.setCurrentPage(currPage);
}
--
View this message in context: http://tapestry-users.832.n2.nabble.com/Saving-state-when-changing-grid-pages-tp5104181p5345443.html
Sent from the Tapestry Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org