Hi all ,
I would like to find a way to return to the page of the recordset I was last browsing and not in the first page
of the recordset as is the default behaviour of the Spry.Data.PagedView between page refreshes.
I have studied the Spry.Data.PagedView Sample in http://labs.adobe.com/technologies/spry/samples/data_region/SpryPagedV iewSample.html
but I fail to understand how to set as a session variable from a spry region the {ds_CurrentRowID} reference which adobe states that "For the PagedView, this is *always* the ID of the first row in the current page."
Do you have any ideas ?
In order to help some declarations:
var ds1 = new Spry.Data.XMLDataSet("ajaxbooksxmlbridgetitle.php", "root/row"...);
var pv1 = new Spry.Data.PagedView( ds1 ,{ pageSize:10 });
var pv1PagedInfo = pv1.getPagingInfo();
and
<p spry:region="pv1PagedInfo" spry:repeatchildren="pv1PagedInfo" class="SpryHiddenRegion" >
<a spry:if="{ds_CurrentRowNumber} != {ds_RowNumber}" href="#" onclick="pv1.goToPage('{ds_PageNumber}'); return false;">{ds_PageNumber}</a>
<span spry:if="{ds_CurrentRowNumber} == {ds_RowNumber}" class="currentPage">{ds_PageNumber}</span>
</p>
in which i believe I should put somehow the session set code (jquery $.post or something else ?)
Many thank for reading.
Dinos
Have a look at using a cookie instead of a session variable. See here http://forums.adobe.com/message/2545547#2545547
Gramps
Many thanks for taking the time to reply ,
I have used the cookie succesfully .I can not find a correct way to instruct the Spry goToPage () method
to go to the page I have "cookie saved". In chrome it updates slowly but in firefox it somehow crashes.
I will keep searching and let you know if I found something.
Many thanks.
North America
Europe, Middle East and Africa
Asia Pacific