Skip navigation
dinos_1974
Currently Being Moderated

Spry pager record position kept between page refresh question

Apr 14, 2012 7:18 AM

Tags: #view #spry #dataset #paged

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

 
Replies
  • Currently Being Moderated
    Apr 14, 2012 8:25 AM   in reply to dinos_1974

    Have a look at using a cookie instead of a session variable. See here http://forums.adobe.com/message/2545547#2545547

     

    Gramps

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2012 5:27 PM   in reply to dinos_1974

    Thank you for your feedback. When I get the time, I'll try looking for a solution as well under the motto two heads are better than one.

     

    Gramps

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points