How to update a designer page so that it has auto-refresh capability.

How to update a designer page so that it has auto-refresh capability.

book

Article ID: KB0071334

calendar_today

Updated On:

Products Versions
ibi WebFOCUS 8207 and higher

Description

By adding the custom JavaScript code we can achieve auto-refresh capability.

Environment

Windows/Linux

Resolution

In order to update the designer page so that it has the auto-refresh capability, we will need to modify or update the page with custom JavaScript.
We have the ability to add custom Cascading Styling sheets and custom JavaScript to our Designer pages.

Follow the below steps to achieve this.

 
  1. Navigate to the Administration Console
  2. From the Configuration Tab, select Application Settings and Other.
  3. Locate the Technical Preview Features and type the following in the edit box: DesignerJS
User-added image

4. Save the above changes

Now you have the ability to add custom code to the Designer pages in the GUI.
Perform the following:
  • Create or edit a Designer Page.
  • From page left options panel -> Select  View outline
 User-added image
  • Select JavaScript.
  • Copy and paste the below code in the JavaScript section.
                " window.setInterval(function ()    
                                                             { $(".pd-page").ibxWidget("callRefresh", undefined, undefined, undefined, true); }
                                                               , 5000);
  • Once you are done close the JavaScript section and save your changes.
  • Your page has the auto-refresh capability.

This will cause the page content to be refreshed at the specified interval (5000 = 5 seconds, 180000 would be 3 minutes). Filter selections in effect at the time of the auto-refresh are preserved as expected.

Note: The tech preview does not need to be on in order to run a page with included JavaScript. It only needs to be on to expose the feature in the GUI so that changes can be made. Once the code has been added, the tech preview can be turned off so that users editing the page will not be able to edit the JavaScript or Cascading Styling Sheet.










 

Issue/Introduction

This article tell us about how we can achieve auto-refresh capability in a designer page.