[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: Saving state when changing grid pages
From: olip <oliverpelz () googlemail ! com>
Date: 2010-07-28 10:06:08
Message-ID: 1280311568561-5345443.post () n2 ! nabble ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic