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.
Here's my original code: //Begin function combobox1_onchange function combobox1_onchange(ctrl) { objCtrl = document.getElementById('combobox5'); populateDynamicCtrl(objCtrl); } //End function combobox1_onchange
Would you mind explaining how the DoResetDownChainControls(ctrl) command would work in this case?
Try putting the 'var' in like below....if that doesn't work you may need a different function for the populate...I tried using this populateDynamicCtrl() function with chained controls but it didn't work. Haven't tried it with non-chained controls. I'm no expert, just ask Tony.
//Begin function combobox1_onchange
function combobox1_onchange(ctrl) {
var objCtrl = document.getElementById('combobox5');
populateDynamicCtrl(objCtrl);
}
//End function combobox1_onchange
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
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
I can see where Michelle is heading on this but the first question to ask is "how is your HTML coded?".
If it was constructed with the painter from your current release and contains all the necessary XML components towards the bottom of the code, then what Michelle suggests might work(?). This is because (from what I can see) the population of controls is now governed by the attribute "fromUniqueId"or similar and the relevant XML node to accompany it. The XML node would have content something like <link linktype="default" from="xxxxxxxx"> which will be picked out using a pattern mask in the JavaScript of //input_controls/input_control[link[@from='xxxxxxxx']] where xxxxxxxx is the fromUniqueId value being passed.
However, if this code was created using a previous generator and/or hand coded then the likelyhood of all the necessary XML being present is in question.
If it is code from a previous release that you are just trying to get working with ibirls3.js then my advice would be - don't bother as ibirls2.js is included for backward compatability.
If you are still stuck then try and give us an idea of what you are trying to do.
ibirls3.js is 37% larger than ibirls2.js and the calls have been changed completely (as you have seen). There are many prototypes being created now and the code is not as straight forward as it's predecessor - hence my not having completely read through it!
If you have an example of what you are doing using one of the sample DBs then you can PM it to me and I'll see what I can recommend when I have time.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Attempting to reverse engineer IBI's run-time JS is a fools errand. It is designed to work for the HTML that is generated by the HTML composer. The tool generates inline DOM objects and a number of setup JS calls. You may discover that some subset of DOM/JS calls works now but that might change in the next bug fix.
If you want to use the functionality contained in IBIRLS3 (or 2), then use the tool and the documented JS calls. The undocumented calls are not guaranteed to work the same way from release to release. That is why they are NOT documented.
If you are currently using an undocumented JS call, please examine the documented ones and see if they fit your needs. If the undocumented call is fulfilling some unique need, then please open a case with CSS requesting the functionality be exposed as a published (and supported) function call.
Brian Suter VP WebFOCUS Product Development
Posts: 200 | Location: NYC | Registered: January 02, 2007
I have 4 combo boxes that are dynamically populated (PFD / Region / Sub-Region / Business Unit). The values come from Stored Procedures. I have a fifth combo box that I call Currency. This also calls a Stored Procedure passing to it values from the first four and returning up to 3 rows of data. None of these combo boxes are chained together.
When I initially launch the page the Currency box is being populated correctly with the values coming in.
My dilemma is this: I want to auto-populate the Currency combobox every time the user changes a value in the PFD, Region, Sub-Region, or Business Unit combo boxes. I understand from reading prior posts that the populateDynamicCtrl command did this in ibirls2. As we are in ibirls3 this command is no longer supported.
So I’m now looking for a way handle this in ibirls3.
Michelle - I tried using the doRepopulateInputControls(ctrl.getAttribute('persistentuniqueid'))command. It did not work. I didn't receive any error messages and the combo box was not refreshed. I may have coded this incorrectly. I found the uniqueid for the currency combobox and placed it in the command. Here is how I coded it:
//Begin function combobox3_onchange function combobox3_onchange(ctrl) { alert(ctrl); doRepopulateInputControls(ctrl.getAttribute("compUid_9")) alert('sreg'); } //End function combobox3_onchange
This was based on the input_control bindcontrolid="compUid_9" found later in the code.
Is this correct?
Tony – This is a brand new HTML form I created in the past week using HTML Composer. Also – I’m not going to try to use any of the ibirls2 commands or backwards engineer anything. Too risky.
Brian – where can I find a copy of the documented js calls? I’ve been searching the web and haven’t had any luck so far. Even the command Michelle provided did not show up when searching through Google.
I have the ibirls3.js saved as a text file if you want it...I could email it to you. I don't see any way to attach a file in the posts.
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
The ibirls3.js file is a readable file so you would only need to obtain it from the server, however, as Brian suggested, I would not advise using many calls directly. If Brian can supply a list of the useable calls that are supported then you may have further hope.
Having said that, what I would do for this question -
quote:
I want to auto-populate the Currency combobox every time the user changes a value in the PFD, Region, Sub-Region, or Business Unit combo boxes.
would be to build the request myself and execute the HTTP request, parsing the returned XML into the select control upon return.
A basic flow would be - onchange event fired so collect the currently selected values in the relevant select controls.
build a URL into a variable called "request" (var request='/ibi_apps/WFServlet?IBIC_server=EDASERVE&IBIF_ex=[your fex]&var1=[value from control 1]&var2=[value from control 2] etc.)
process the URL using - var xmlDoc = getXml(request, true); which is an internal call that exists in ibirls2.s and ibirls3.js. Whether this is a supported call or not?
clear out the currency select control
take the resultant XML response and parse it as options into your currency select control
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Would it be possible for you to supply a list of the useable calls that are supported? I'm trying to avoid re-engineering over a dozen reports as fixes & updates to the product are applied.
Brian mentions "use the tool and the documented JS calls" - where are these documented? I searched for ibirls2, ibirls3, populateDynamicCtrl and DoResetDownChainControls in the Technical Documentation Library and found nothing, my query was "too restrictive".
It's 2011 and the dawning of a new era, I'd like to try using the GUI development tools in Dev Studio, but I would like to see detailed documentation.
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
If it helps, this is how I used the DoResetDownChainControls(ctrl) and it should be in the file I sent you. Michelle
//Begin function ResetSelects
function ResetSelects() {
var ctrl = document.getElementById("LNcombobox");
ctrl.selectedIndex = 0;
DoResetDownChainControls(ctrl);
onInitialUpdate();
}
//End function ResetSelects
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
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
onInitialUpdate();
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
//Begin function onInitialUpdate sets focus to the last name combobox
function onInitialUpdate() {
document.getElementById('LNcombobox').focus();
form1Reset_onclick(ctrl);
}
//End function onInitialUpdate
//Begin function ResetSelects
function ResetSelects() {
var ctrl = document.getElementById("LNcombobox");
ctrl.selectedIndex = 0;
DoResetDownChainControls(ctrl);
onInitialUpdate();
}
//End function ResetSelects
//Begin function form1Reset_onclick
function form1Reset_onclick(ctrl) {
window.top.frames.report1.location.href = 'about:blank';
ResetSelects();
onInitialUpdate();
}
//End function form1Reset_onclick
If you follow the calls to OnInitialUpdate(), it looks like an endless loop(at least it did to me) but it only works this way. I tried changing it up but came back to this as the only solution.
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
//Begin function form1Reset_onclick function form1Reset_onclick(ctrl) { window.top.frames.report1.location.href = 'about:blank'; ResetSelects(); onInitialUpdate(); } //End function form1Reset_onclick
OOPS! I guess I do have one too many calls to onInitialUpdate(). The one int he quote is not necessary. Doesn't hurt anything but not necessary.
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
I don't think it will. I have been switching back and forth to the GUI and it works. I have read in the WF Help files that they do not recommend a lot of custom code because they can not guarantee how it will work in future releases. I don't consider this is "custom" code. It's all stuff available to us to use and tweak.
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
This one is courtesy Tony A. I used this code in another procedure when I had multiple selects to reset.
//Begin function ResetSelects
function ResetSelects() {
selectCol = document.getElementsByTagName("SELECT");
for(i=0; i<selectCol.length; i++) {
var el = selectCol[i];
this.displayElement = document.getElementById(el.id);
this.displayElement.selectedIndex = 0;
}
}
//End function ResetSelects
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
I'm very new to working with this code "behind the scenes". I've done 3+ dozen screens just using the GUI tool so I have another question.
Is the execution of this code tied to all dropdowns or events found on the screen?
If so, is there a way to restrict this to just the initial 4 dropdowns? I have several other dropdowns and radio buttons that have no impact to the Currency dropown box I'm trying to update.
The loop code I sent you was just an example. I would only use that if resetting all of your selects at the same time. I went back and re-read your initial post and I appologize, I may have gotten us side tracked with resets. You have at least 2 comboboxes (1 and 5) and when 1 changes you want to populate 5...correct?
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
I did this in ASP.NET but not WF. I'll keep thinking.
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
And they can't be chained? Can someone make a selection of some and not all?
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
I tried using the chaining but failed. I think because all 4 comboboxes values need to feed the fifth box.
To your second question - the user does not have to pick any values in any of the boxes. The boxes do come up with a *ALL option as a default from each Stored Procedure. That *ALL value behind *ALL is then passed to the report.