This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Nov 6, 2011, 7:55 PM
33 Posts

Preserve view position

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 3
I was trying to work out a solution that would preserver position in a view panel while navigating through pages. A typical use case is: user navigates through a view panel and opens another page to see the details about selected record. When he/she returns back to the view panel the position should be the preserver instead of returning back to the very first page.
I came across this article http://notesnl.blogspot.com/2011/09/keep-view-position-between-xpages.htm but it turned out to work only in case the pager works in full refresh mode (instead of partial refresh one) which is not very convenient. Any idea how to design a solution that would bring the required behavior while using partial refresh mode of the pager?
Nov 7, 2011, 8:50 AM
261 Posts
Re: Preserve view position
Did you try the "Pager save state" (<xe:pagerSaveState>) control from the Extension Library?
 
Have a look at the Domino_ViewState XPage in the Ext Lib Demo database for an example on how to use it.
 
Mark
Nov 8, 2011, 9:50 AM
33 Posts
Re: Preserve view position [updated]
Thanks Mark for the hint. I will try that. I have tried that. Although it really solves the case when user clicks a button that (besides other things) closes the document and opens the view again it does NOT work in cases when a user simply clicks on back button provided by the browser.
I have tried to use onunload page event to execute viewStateBean.restoreState = true. It seems that the code gets executed (at least no error is shown on Domino console) the view state is not restored.
Nov 23, 2011, 10:34 AM
261 Posts
Re: Preserve view position
Mirek,
 
I just added an article to my blog called The order of events in XPages with some more background information on what happens if you use the Back button. Perhaps one of the methods described there has a solution to your problem.
 
Mark
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal