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] HTML Composer: IbComposer_setCurrentSelection - how to make it work?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] HTML Composer: IbComposer_setCurrentSelection - how to make it work?
 Login/Join
 
Expert
posted
I have two windows. From window two I want to affect a control in window one, hopefully using the function IbComposer_setCurrentSelection.

I cannot get it to work.

Using normal JavaScript works:
parent.opener.document.getElementById('SAVE_REPORT_NAME').value = varSAVE_REPORT_NAME;

Using IbComposer_setCurrentSelection does not work:
parent.opener.IbComposer_setCurrentSelection(parent.opener.document.getElementById('SAVE_REPORT_NAME'),varSAVE_REPORT_NAME);

varSAVE_REPORT_NAME is a JS variable containing the value I want to update the control with. I get no error but nothing happens.

Any ideas?

Thanks,

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
In file C:\ibi\WebFOCUS77\ibi_html\javaassist\ibi\html\js\ib_composer_api.js I found this:

//selects values in the control// arrValues is the array of values to be selected not done yet

function IbComposer_setCurrentSelection(controlId, arrValues, bUpdateDependencies)
{
    setCurrentSelection(controlId, arrValues, bUpdateDependencies);
}

I certainly hope that "not done yet" doesn't mean the function is non-functional yet (as at v7.7.03)...

As per the documentation, I tried putting the value in an array, but that didn't work either.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I put an alert in function IbComposer_setCurrentSelection in file ib_composer_api.js and I get nothing - seems like it does not get called?!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Francis,

I believe part of your problem is that you are passing a control to the function rather than the unique ID (string value).

Try changing your function to:

parent.opener.IbComposer_setCurrentSelection('SAVE_REPORT_NAME',varSAVE_REPORT_NAME); 


Also is opener a HTML document in a frame in the parent HTML?

Cheers

Stuart


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
I found certain requirements to make IbComposer_setCurrentSelection work, which I mention about two-thirds of the way through this earlier post.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
Dan, thanks very much for the information - I will take a look later this evening.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
The 7703 manual shows that the API function takes 'controlID' in the syntax and explains that 'controlID' is the unique identifier of the control from which values are obtained.

Additionally, the "Not done yet" comment in the JS file means that these values have not been obtained yet.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Expert
posted Hide Post
I corrected my faulty code and this line now works - it sets the value of a text field:

parent.opener.IbComposer_setCurrentSelection('SAVE_REPORT_NAME',SAVE_REPORT_NAME);


The next thing I'm trying to work out is how to call IbComposer_setCurrentSelection to set two very particular double-list boxes - one is a list of report dimension (sort by) column names and the other is a list of measure column names. The IbComposer_getCurrentSelection function on these two double-list boxes returns something like "COUNTRY BY MODEL BY CAR" AND "SALES AND WEIGHT AND LENGTH", respectively. To use these values in IbComposer_setCurrentSelection, based on the documentation, the values must be in an array - so I stripped out the BY and AND and created arrays. When I assign these arrays to the IbComposer_setCurrentSelection, the double-lst boxes do not get set.

Are these two types of double-list boxes too specialized?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Solved!

I was not calling the function properly - it works very well for a variety of control types, in fact IbComposer_getCurrentSelection and IbComposer_setCurrentSelection are great functions. In the past, I had developed something similar to what I'm doing now, but with traditional JavaScript, with which I had to treat each control type differently - radio buttons, list boxes, double list boxes, etc. With IbComposer_getCurrentSelection and IbComposer_setCurrentSelection, you don't have to worry about the control type - as long as you have the value(s) - they just work.

My thanks to tech support.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Barry is great! I was feeling very sad for how frustrated you were. Glad to hear you are now touting this wonderful toolSmiler


WebFOCUS Server 8.1.05
Windows 2008 Server
WebFOCUS AppStudio 8.1.05
Windows 7 Professional
IE 11 and Chrome Version 43.0.2357.124 m.
Mostly HTML, PDF, Excel, and AHTML
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Expert
posted Hide Post
Barry is wonderful. The tool is great and can be made better!

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report 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] HTML Composer: IbComposer_setCurrentSelection - how to make it work?

Copyright © 1996-2020 Information Builders