State Manager w/ Paging Generator

I swear I saw a tutorial on this butt I can’t seem to find it. Maybe I’m dreaming.

I need tot figure out how tot use the state manager with the pagination generator so that when the user clicks on a link in the repeat region and come back to the list they are on the same page in the pagination that they left from.

@brad, this might be what you were looking for, Resetting the offset for new query results

Not quite, @scott … need more the tutorial on using the state manager in the paging generator.

The State Manager works while on the same page, but if a user leaves the page, then you would need to use either a Session or maybe the url return variable so that the browser knows where the user was when they left the page.

Hmmm, why would someone need a state manager on the page if you don’t leave the page?

State manager has more than just query. Cookies, sessions and local storage lives longer than the page naturally

Right, but in the context of the Paging Generator, it would retain the user position only while the user is on the same page, if a user were to leave the page, a more persistent method would need to be used to retain the user position, correct?

Well that is the power of the state manager. You just choose the right type of state manager, add it to the page and use it.

If you want to retain the paging for example when you go to other page and then back, you can choose to use the session or local storage state manager.

But how would you set the session value from the paging buttons?

BAsically I am trying to accomplish this butt with the paging generator.

I think this is the last part I need tot figure out. If I add a Set Value to the paging links themselves the paging stops working.

I seem to recall I did a video covering this. Check YouTube channel for video on pages queries (sorry just on phone at present)

I think this is the video you are referring to.

I will try recreating my paging in the morning. Thanks Brian!

Edit: Would it be the same procedure to use session variable instead of url parameters?

Probably would be a but complicated as sessions in app connect are browser sessions, not server session so sync may need custom pho

Yes it is the same. It works the same, all you need is to define your session variables and select them in the paging UI.

I can confirm that it works wonderfully with sessions!

2 Likes