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



Mar 2, 2011, 4:18 PM
16 Posts

Time taken to apply search to view panel

  • Category: Other
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags: view panel,search
  • Replies: 1
I have an XPage which I am using as a search page. My users enter data and when they click the Search button, I run a SSJS script to set a sessionScope variable with the search string, do a full update of the page and display a DominoView with the "search" property set to the value of the sessionScope variable. This works fine

I would like to add a field showing how long the search took from the moment the user clicked the button to the moment the results were displayed
In my SSJS, the first thing I do is set a sessionScope variable to Now.
I cannot seem to find the place to put the setting of the finish time (I've tried afterPageLoad, afterRestoreView, beforeRenderResponse, afterRenderResponse, postViewOpen) but the calculation is just not working.
 
It would be  great if I could create a "searchCompleted" event (or listener) - any suggestions on that approach

Any suggestions gratefully received

Mike
Mar 4, 2011, 2:18 PM
64 Posts
Re: Time taken to apply search to view panel
- I use beforePageLoad for about everything in SSJS, it seems.  Did you try that one?  If you're doing a full reload that should fire, and it will do so at a point where changes you make will appear in the rendering.
 
- Alternatively put SSJS in the element that reports the time.  That will run during the render and compute your value.  Something like this:
 
<xp:text value="#{javascript:(Now - sessionScope.yourvar);}" />
 
Hope this helps.

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