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


Technique

Product: Business Intelligence Portal
Release: 8205
Primary OS: All Platforms
Solution Date:

Problem

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

Solution

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.

With the release of WebFOCUS 8205, we now have the ability to add custom Cascading Styling Sheet and custom JavaScript to our Designer pages.

Here are the steps to accomplish 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

  1. Save your changes.   

Now you have the ability to add custom code to the Designer pages in the GUI. Perform the following:

  1. Create or edit a Designer Page.
  2. With the page component selected, click on the properties button to show the available properties.
  3. Toggle on the button for Custom JS. Note the new JavaScript Tab that appears at the bottom of the page.
  4. Click on the JavaScript tab to open the text editor where you can add your custom code.
  5. Save your changes

 

 The custom code needed to enable the auto-refresh of the page is as follows:

 window.setInterval(function (){

    $(".pd-page").ibxWidget("callRefresh");

}, 5000);

 

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.