mklaus1
 New Member Posts:7
 |
| 28 Feb 2008 04:28 PM |
|
I've been trying to figure out how to maintain the PageNumber state when navigating between pages. I'd think this was a common scenario, you go to a page that lists the items (ajax enabled) and go to say page 3, then click a link that redirects to an items detail page, you save or cancel from there and go back to the list page, I want it to show the same page (3 in this example). I cannot get this to work for the life of me, any ideas? Thanks, Michael |
|
|
|
|
pauldes
 Veteran Member Posts:1392
 |
| 29 Feb 2008 03:49 AM |
|
I think it is a session variable that begins with RPP and has the moduleid in it. Check the debug Statistics |
|
| ListX....makes you look brilliant, even though you're not. |
|
|
zymmetrical
 Basic Member Posts:141
 |
| 03 Mar 2008 10:04 AM |
|
We desperately need this functionality too.. if it is that session variable, how do I wire it up to bring the user back to the right page? |
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 03 Mar 2008 02:47 PM |
|
Hello guys, Were you able to use the session variables to handle this process. Pauldes has something when it comes to finding the session variable that holds this page number. Thanks, |
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|
zymmetrical
 Basic Member Posts:141
 |
| 03 Mar 2008 05:04 PM |
|
No im afraid I'm not clever enough to sort this one out without some more specific help. |
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 03 Mar 2008 05:13 PM |
|
Hello zymmetrical, In the ListX debugger there is a field for the page number. This information is in the statistics portion of the message. It is somewhat encrypted, but it should say page number with a RPP in front of it with the tab ID and module ID. You can use this identifier in an Action Assignment to session, and set that session ID as the name to the value from the session variable you are persisting. This way, when the page loads, you can set the one session variable to the other.
Honestly, I would not try to persist the variable in the session. I would personally pass the page number in the query string to the next page, then have that page pass it back. That way there is no session involved. Other then these two ways it will be difficult to get information to go from one page to the other for each of your users. Thanks,
|
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|
zymmetrical
 Basic Member Posts:141
 |
| 04 Mar 2008 01:56 PM |
|
With a querystring variable, I'd think i'd have to pass the moduleid and pagenumber, otherwise if the user goes on to another ListX instance on the site that supports this pagenumber-remembering feature, they'd be incorrectly set to the page number of the previous module they were on, right?
Would a cookie be a practical solution as well?
|
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 05 Mar 2008 02:49 PM |
|
Acutally the session identifier is based on module and tab. It will jump to any page as long as you include the logic to set the page number. Passing the page number to the page by the query string is a good way to jump to any page in your list for a particular page.
If you have multiple modules on the page that have the pager, then you will need to specify which module. But you should be ok with any other page. Thanks, |
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|
zymmetrical
 Basic Member Posts:141
 |
| 09 Mar 2008 10:22 PM |
|
Ok, I have checked out the statistics area and the only Pagenumber related label is under 'Viewstate' and is called CurrentPageXXXX (with XXXX being the tabmoduleid).
I cannot apparently access this value via [CurrentPageXXXX,viewstate], so I just resorted to trying to assigning [Pagenumber,System] to a session variable in the Action sequences, and then at the beginning of the Action sequence assigning the pagenumber to the session value.. but the results are inconsistent. It -seems- like if I F5 refresh it wakes up but it's still not happening over multiple pageviews.
I am using default AJAX pager with lxFetch.. and I have narrowed the requirements for what we need to do here: there is only one Listx instance on each page so we don't really need to break it down by module. If I could just assign a session variable for the module like 'tagSearchResults,s' then it would do the job. |
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 10 Mar 2008 02:49 PM |
|
This values is actually not a ViewState variable, it is a session variable. You can access using the session space. In .NET the session is separate from the ViewState. Thanks, |
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|
zymmetrical
 Basic Member Posts:141
 |
| 10 Mar 2008 03:17 PM |
|
Thanks, but I still don't see anything in the statistics under 'Session' that looks like a pagenumber- I thought maybe it was this one:
RPPm2061t1472: 1
but, it doesn't increment as I moved through the pages, it seems to stay on 1. In the beginning of my action sequence I read from my custom session variable "TSAP" and have the pagenumber change to whatever is in there. At the end of my action sequence, I do this:
Assignment: Assign <Session> variable 'TSAP' to '[RPPm2061t1472,Session]
However it's just not working, as like I said, this RPPm2061t1472 value always seems to return 1 instead of the current page.
Here is what i'm looking at: # Session
1. sortActionList19833167: ArrayList[0] 2. RPPm1983t1411: 21 3. sortActionList22073167: ArrayList[0] 4. RPPm2207t1411: 21 5. sortActionList15263167: ArrayList[0] 6. RPPm1526t1411: 21 7. 15263167FILTERFIELD: 8. 15263167FILTERTEXT: 9. RPPm1983t36: 21 10. RPPm1983t118: 21 11. sortActionList20693167: ArrayList[0] 12. RPPm2069t118: 21 13. RPPm1983t1348: 21 14. sortActionList20613167: ArrayList[0] 15. 20613167FILTERFIELD: 16. 20613167FILTERTEXT: 17. RPPm2061t1472: 1 18. sortActionList20623167: ArrayList[0] 19. RPPm2062t1472: 21 20. 20623167FILTERFIELD: 21. 20623167FILTERTEXT: 22. TSAP: 1 23. RPPm1983t1347: 21
# Cookies
1. __utmv: <snipped> 2. __utmz: <snipped> 3. .ASPXANONYMOUS:<snipped> 4. __utma: <snipped> 5. __utmc: <snipped> 6. ASP.NET_SessionId: <snipped> 7. language: en-US 8. .DOTNETNUKE: <snipped> 9. 1645_selected: dnn_ctr1645_Aggregator_Tab3 10. sTag: 'woman' 11. portalaliasid: <snipped> 12. portalroles: <snipped> 13. language: en-US
# ViewState
1. CurrentPage2267: 0 2. TotalPages2267: 17
|
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 10 Mar 2008 04:19 PM |
|
Hello, You would set this value using an Action:Assignment and select PageNumber from the dropdown. Then you can assing the number based on the Query String. (Remember it is 0 relative and leave name blank). Thanks, |
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|
mklaus1
 New Member Posts:7
 |
| 10 Mar 2008 04:50 PM |
|
This is how I got this to work, add these actions: 0. If [Request.RequestType,System] = GET 1. Assignment: Assign PAGENUMBER variable to '{MATH,"[FORMAT, [flt[TABID,System]PageNumber,Session], {ISEMPTY:1}] - 1"}'. 2. Assignment: Assign <Session> variable 'flt[TABID,System]PageNumber' to '[PAGENUMBER,System]'. It's a little strange because when you assign the PAGENUMBER variable it is zero based. But, when you read [PAGENUMBER,System] it is not! Which is why I have to subtract 1 using the MATH function. Best of luck, Michael |
|
|
|
|
zymmetrical
 Basic Member Posts:141
 |
| 10 Mar 2008 05:16 PM |
|
Thanks, i'm not clear whether actions 1. and 2. in your example are both supposed to be indented inside the IF ?
I tried both options but am still being returned to page 1 after going to our product detail page and coming back.. <img src='desktopmodules/ntforums/images/emoticons/sad.gif' height='20' width='20' border='0' title='Sad' align='absmiddle'>
Sorry to be difficult I just can't see why it's failing.. |
|
|
|
|
mklaus1
 New Member Posts:7
 |
| 10 Mar 2008 05:20 PM |
|
Action #1 is in the IF, #2 is always run. I guess the other point is you have to use [PAGENUMBER,System] in the query, just like the custom paging example in the docs. Michael |
|
|
|
|
zymmetrical
 Basic Member Posts:141
 |
| 10 Mar 2008 05:20 PM |
|
Ok, correction. It does seem to bring me to right page, but only if I go back to the list with a new page view - pressing Back in the browser does not initiate the return to the correct pagenumber..
Is there some way I can force a refresh on Back button press? 99% of our user paths would be from Listx > product page < back to Listx, using the browser back button. |
|
|
|
|
mklaus1
 New Member Posts:7
 |
| 10 Mar 2008 05:28 PM |
|
The back button is working for me, just like when I redirect to the page. Under general properties I have Use Custom Paging and Enable Ajax Interaction both checked. I don't know if that helps. Michael |
|
|
|
|
contactdp
 Basic Member Posts:475
 |
| 12 Mar 2008 04:45 PM |
|
it looks like with this method back may be working in some browsers but not all... back to list always worked for me this the similar method but not browser back.
Thanks, DP
|
|
| Durga Prasad(DP) | Senior Web Engineer<br>R2integrated |
|
|
zymmetrical
 Basic Member Posts:141
 |
| 12 Mar 2008 04:45 PM |
|
I believe my issue is with Pageblaster caching. When I try this in the Host account as opposed to as an anonymous user, it seems to pick up the session pagenumber.
I have tried exclude "xlisitng.js" from Pageblaster caching but it didn't affect this.. I wonder if there's some other Listx JS component I should exclude? |
|
|
|
|
kevinmschreiner
 Advanced Member Posts:729
 |
| 19 Mar 2008 02:24 PM |
|
I am currently looking into handling of the back button on a consulting project. The requirement is to allow the browser to retain the back button functionality within the page context, even when ajax is the target. I'll post back when a solution is fully provided. |
|
|
|
|