Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Only Refresh one tile in BI Portal - HTML Composer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Only Refresh one tile in BI Portal - HTML Composer
 Login/Join
 
Platinum Member
posted
Hello,

I currently have an issue where I want to click on a button in HTML composer, only run one tile, and after that tile loads, load all the other tiles in my portal.

I did some reading on the focal point forums and it looks like javascript is the answer here. My problem is whatever Javascript I try to incorporate into HTML Composer doesn't seem to work.

I found this code but I can't get this code to work (or any code for that matter) in HTML Composer. What am I doing wrong?

 function refreshReports(){
 var name = this.window.name;
 var frameArray = ["Panel_7_2"];
// Refresh only Panel 7 2.  
 parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());
 parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ARRAY, name, frameArray);
}    



The reason I am only running one tile at first is because this file goes into foccache and then all other tiles in the portal will pull data from that file.

Is there a way to do this? Thank you in advance!

This message has been edited. Last edited by: Brandon Andrathy,


WebFOCUS 8204
 
Posts: 152 | Registered: July 10, 2018Report This Post
Expert
posted Hide Post
The simple answer here is Yes.

We have some portal pages that do the same thing, run one report and it is working for us.

What happens when you click the button. I assume the refreshReports function is run with the onclick event ?

There is also another option.

Have you thought about having the composer page create the foccache data (assuming it does not take long) in a call after the HTML page is loaded (behind the scenes)


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Hey Waz, thank you very much for your response. It's unfortunate that nothing happens with the onclick event. I have an animation set up to do a javascript call. My javascript call is refreshreports.

But when I try to call it, it doesn't do anything. The problem here is I want to create that foccache data when the user clicks on the button that refreshes the current page of the BI Portal. Since the foccache data is filter driven, I'd like to recreate it due to selections the user makes. (data is pretty large)


WebFOCUS 8204
 
Posts: 152 | Registered: July 10, 2018Report This Post
Expert
posted Hide Post
OK, time to debug.

I would as a first step find out if refreshReports is even being called.

Add an alert or console.log to the function. The alert will popup, the console.log will get shown in console of developer tools (usually F12 in the browser).

The console.log is also good for interrogating objects and variables


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
Hey Waz, thanks for your response.

OK, you were right. I wasn't calling the button 1 onclick. I fixed that.

So now that I got that working, it looks like I get an error when calling refreshReports();.

Here's my code, what am I doing wrong here?

 function button1_onclick(event) {

UpdateData();

var curval = 'yes';

alert (curval);

refreshReports();

// TODO: Add your event handler code here

 

 

}

//End function button1_onclick



function refreshReports(){

 var name = this.window.name;

 var frameArray = ["Panel_7_2"];

// Refresh only Panel 7 2.  

 parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());

 parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ARRAY, name, frameArray);

}     


WebFOCUS 8204
 
Posts: 152 | Registered: July 10, 2018Report This Post
Expert
posted Hide Post
Whats the error ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
I get the following error:

Unable to get property 'setAllAmpersValues' of undefined or null reference

Then if I try to call refreshReports. I get another error. "unable to get property refresh of undefined or null reference.


WebFOCUS 8204
 
Posts: 152 | Registered: July 10, 2018Report This Post
Expert
posted Hide Post
Are you testing this standalone or inside a portal ?

It is complaining that setAllAmpersValues is null, therefore you need to check on BipIframeInterface and parent.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
I'm just trying to test in the HTML page at the moment. I have a car file in there and a dropdown box control that links up to the parameter?

Is that not going to work? Should I test in a portal?


WebFOCUS 8204
 
Posts: 152 | Registered: July 10, 2018Report This Post
Platinum Member
posted Hide Post
so, now that I figured out how to actually call the script, I got this working exactly how I wanted!! Thanks for the hint to actually try this in the portal Waz!

Here's my code for anyone interested:

 function button1_onclick(event) {

UpdateData();

var curval = 'yes';

alert (curval);

var val = IbComposer_getAllAmpersValues();

alert(val);

refreshReports();

// TODO: Add your event handler code here

 

 

}

//End function button1_onclick

//Begin function refreshReports

function refreshReports(){

  var name = this.window.name;

  var frameArray = ["Panel_2_1"];

  parent.BipIframeInterface.setAllAmpersValues(name, IbComposer_getAllAmpersValues());

  parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ARRAY, name, frameArray);

//  parent.BipIframeInterface.refresh(parent.BipIframeInterface.REFRESH_ALL_BUT_SELF , name);

}

 

//End function refreshReports 


WebFOCUS 8204
 
Posts: 152 | Registered: July 10, 2018Report This Post
Expert
posted Hide Post
Yes, the BipIframeInterface is part of the portal


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Only Refresh one tile in BI Portal - HTML Composer

Copyright © 1996-2020 Information Builders