Bill F
Bill F

Reputation: 2087

Using the StartKey on a viewDataSource

When a user clicks on the link to open a document I set a sessionScope variable to the Key for that document. The StartKey property on the view dataSource is set to that sessionScope variable. All works well, but if I open a document on page one and return that document is at the top of the page and the back on the pager does not work. I don't see how to do an onClick event on the Pager at which point I could set the sessionScope to null and I expect the pager would work correctly ie go back to the first document in the view. Is tehre a workaround to do an onClick event or ?? on the pager?

Upvotes: 0

Views: 61

Answers (1)

Shean McManus
Shean McManus

Reputation: 158

Have you looked at the Pager Save State control from the extension library? This control saves the state of the pager so when you leave and come back to a page the return will be at the same place you left off. Saves having to manually keep track of all this.

Here is a related question and answer on the Pager Save State control.
How can I save the state of a repeat control?

Upvotes: 1

Related Questions