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.
I am attempting to use IbComposer_setCurrentSelection to reset a multi-select Tree Control to a particular set of values. I call the function like this:
// Reset the Tree Control
parent.parent.IbComposer_setCurrentSelection('P_NODE_NO', 'x');
// Populate the Tree Control
P_NODE_NO = '1, 3';
parent.parent.IbComposer_setCurrentSelection('P_NODE_NO', P_NODE_NO);
Only the first value (1) gets selected. If I have only one value, it gets selected. Multiple values do not get selected.
Also, is there a way to reset a multi-select tree control? I'm currently doing this by setting it to a non-existent value, but I would like to use the official method.
Thank you,
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
// Loop does not work - only last values is selected
for(var i = 0 ; i < P_NODE_NO.length ; ++i)
{
alert(P_NODE_NO[i])
parent.parent.IbComposer_setCurrentSelection('P_NODE_NO', P_NODE_NO[i]);
}
This does not work:
parent.parent.IbComposer_setCurrentSelection('P_NODE_NO', '1 OR 2');
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
Hi Francis, I just went through this a week or so ago with Barry S., however, I was using a listbox control. I got very frustrated trying to figure out why I could get the first selection or the last selection but not both. We discovered it was a bug with the RIA theme applied, which you probably aren't using(most people don't and I can see why). So in our example not using a RIA theme, this code worked;
function onInitialUpdate(){
var listbox = document.getElementById("listbox1");
for(var count=0; count < listbox.options.length; count++) {
listbox.options(count).selected = true;
}
}
//Begin function button1_onclick
function button1_onclick(ctrl) {
IbComposer_setCurrentSelection('listbox2', IbComposer_getCurrentSelection('listbox1'), false);
}
This will select all items in the first listbox on load then with button click will select the same items in the second listbox.
Hope it helps.
Michelle
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
Thanks for this. I think the problem is the multi-select Tree Control is an even more special beast than a double list (which I think is what you're working with) so I'm not sure your solution will work in my case.
After much investigation inside ibirls3.js, it appears the multi-select Tree Control is not recognized as multi select in the functions that IbComposer_setCurrentSelection calls.
Adding one line of code makes it work - Force the Tree Control to be recognized as multi-select :
// Added By Francis Mariani - 2013/03/13 to force Tree Controls to be recognized as multi-select
if (type == 28) multi = 'multiple';
Doing this is completely illegal but it improves my quality of life. I've done this in the Dev environment until I get a better solution from 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
The Tree Control seems to be a very very special beast. Upon load of the page, collapsed tree branches are not known to the Document Object Model (DOM), hence they will not be selected by this method.
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
So, even without this reported problem, IbComposer_setCurrentSelection doesn't work properly with multi-select tree controls. If the value to be set is in a branch that has not yet been expanded, it does not get set.
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
I was informed by Tech Support that the API function IbComposer_setCurrentSelection does not support a multi-select tree control, even though it does support other multi-select controls and the single-select tree control.
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
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