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     Tree Control in HTML Composer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Tree Control in HTML Composer
 Login/Join
 
Guru
posted
Hello everyone,

I have created a hierarchy tree control using the MULTI OR paramater creating check boxes instead of radio buttons.

The question I have is that when the page first loads it defaults the top Parent as being checked when I do not want it to be. I was wondering if I can control this via Javascript.

I tried using

 document.getElementById("treecontrol1").parentNode.checked=false; 


in the Window Onload, but it is not making a difference. I am not certain what type of element a tree control is and how to reference it.

Any help would me much appreciated.

Thanks


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
You must heed the following advice that's embedded in the HTML Composer generated code:

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports


Create a new JS function called onInitialUpdate and put your js line in it. (This still may not work, but at least you'll be calling the js the way you're supposed to).


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
Thanks Francis for the suggestion. That didn't work as well.

I can still check the value of what is selected and deal with it that way in the report itself, but I wanted to uncheck it to make it cleaner.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
I don't know how you created check boxes instead of radio buttons - I can't seem to. Doe the tree control have "Default Selection" in the Properties window? It's Yes by default, perhaps setting it to No will not have any pre-selected check boxes.


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
Yes it's not very intuitive. To create check boxes instead of radio, you need to select the parameters tab at the bottom of Composer. In the main window, right click and add a new parm and then drag your control to the new parm to link it. In the parm properties, you can select the Multi Or option and that will create your check boxes.

I have tried changing the default selection to No, but that does not make a difference.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Guru
posted Hide Post
MattC,

You can specify a "selected value" in the Properties and Settings dialog for the tree control to have a different value selected by default. No JavaScript needed.


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
Guru
posted Hide Post
Hi David,

If I do that, it does select the value that I entered as well as keeps the original checked. It also expands out the tree when I do that.

What do I put if I do not want any value selected?


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Guru
posted Hide Post
I don't know if this makes a differences but my Tree is driven by an External Procedure and from what I gather it's pretty touchy.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
"You can specify a "selected value" in the Properties and Settings dialog for the tree control to have a different value selected by default. No JavaScript needed." - I don't think this answered the question, but maybe it points to a possible solution: for the "selected value" enter a value that will never be populated by the external procedure, e.g. "xyzxyzxyz"...


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
MattC,

Set the "Default Selection" property in the Property Sheet to "No".


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
Guru
posted Hide Post
Yes I tried that, but it is not working correctly. I am having some strange behavoir with the Tree Controls. They functionally work, but if I add new parameters to my report/html, the Composer changes my parameters for the tree control back to single select intstead of multi.

It's quite painful as I am adding new filters in phases and having to go back in and set it all back up again for these Tree controls.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Guru
posted Hide Post
You need to make sure your parameters are multiselect in the procedure that use them.


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
Guru
posted Hide Post
The parameters for the Tree Control are used in SQL. It's building an in list that is used in the SQL.

&BaseP is what is coming in from the Tree Control

-SET &BaseProdLength    = &BaseP.LENGTH;
-SET &BaseProdAdj       = STRREP (&BaseP.LENGTH, &BaseP, 3, ' OR ', 1, ',', &BaseP.LENGTH, 'A&BaseProdLength.EVAL');
-SET &BaseProdTru       = TRUNCATE(&BaseProdAdj);
-SET &BaseProdSQL       = IF '&BaseP.EVAL' CONTAINS 'OR' THEN ',in_base_prod_group_tbl => mktgdw.t_number_tbl(&BaseProdTru.EVAL)' ELSE ',in_base_prod_group_tbl => mktgdw.t_number_tbl(&BaseP.EVAL)';
  


How do I make that a multiselect parameter in the procedure?

Thanks


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Guru
posted Hide Post
Unfortunately, in that construct you cannot. If it was in a WHERE, you use OR or AND in the parameter syntax. Composer requires this to know it is multiselect since there is no property on the Property Sheet for the tree control until WebFOCUS Release 8. So you will need to do it your way until you move to release 8.


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Tree Control in HTML Composer

Copyright © 1996-2020 Information Builders