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     [CLOSED] JS Command populateDynamicCtrl
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] JS Command populateDynamicCtrl
 Login/Join
 
Member
posted
Hello,

In ibirls2 there was a js command called populateDynamicCtrl. This allowed for the refresh of an object on an HTML page.

In ibirls3, this command is no longer available.

Is there another command in ibirls3 that has taken the place of populateDynamicCtrl?

Thanks,

Bob

This message has been edited. Last edited by: Kerry,
 
Posts: 17 | Registered: December 20, 2010Report This Post
Expert
posted Hide Post
Bob,

Check out DoResetDownChainControls(ctrl); where ctrl is an object in the chain

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, 2004Report This Post
Member
posted Hide Post
Tony,

I'm a novice when it comes to these js commands.

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?

Thanks!

Bob
 
Posts: 17 | Registered: December 20, 2010Report This Post
Expert
posted Hide Post
Sorry Bob, I thought you were refering to a chained object not one that you just want to populate.

I am guessing that you used to use this with the earlier version and that you are now trying to replicate that same functionality using ibirls3?

I haven't read through ibirls3.js as I did the previous two incarnations so I couldn't really tell you what the equivalent function is.

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, 2004Report This Post
Member
posted Hide Post
You are correct. This command was used earlier and now is not supported in ibirls3.

I saw a couple of your posts from Nov 2009 on this command. I was hoping you had figured out a way to do this using available ibirls3 commands.

I'll keep digging.

Thanks Tony.
 
Posts: 17 | Registered: December 20, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
Try this;

doRepopulateInputControls(ctrl.getAttribute('persistentuniqueid'));


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

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, 2004Report This Post
Platinum Member
posted Hide Post
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, 2007Report This Post
Member
posted Hide Post
First - Thank you all for your replies.

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.

Again - Thanks for your help!
 
Posts: 17 | Registered: December 20, 2010Report This Post
Expert
posted Hide Post
quote:
I’m not going to try to use any of the ibirls2 commands or backwards engineer anything. Too risky.

With a new development then totally agree with you.

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, 2004Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
That would be great.

Please send it to: rmcnally@lear.com

Thanks!
 
Posts: 17 | Registered: December 20, 2010Report This Post
Member
posted Hide Post
Group,

Any ideas?

Bob
 
Posts: 17 | Registered: December 20, 2010Report This Post
Expert
posted Hide Post
Bob,

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, 2004Report This Post
Member
posted Hide Post
Tony,

Thanks for the suggestion.

Brian,

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.

Thanks,

Bob
 
Posts: 17 | Registered: December 20, 2010Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
Michelle,

What is the trigger or event that calls the ResetSelects function?

I'm currently using the combobox3_onchange event.

Bob
 
Posts: 17 | Registered: December 20, 2010Report This Post
Guru
posted Hide Post
Here is my html code.

<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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
If I implement this code then use the GUI Tool for later updates to the page, does anything get broken as a result?
 
Posts: 17 | Registered: December 20, 2010Report This Post
Guru
posted Hide Post
quote:
//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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
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.
 
Posts: 17 | Registered: December 20, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
There are 5 total. Each call a Stored Procedure for retriveing their values.

The values from the first 4 are used by the fifth to determine the values to return.

So my goal is to make the system refresh the fifth box anytime one of the first 4 are changed.
 
Posts: 17 | Registered: December 20, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Guru
posted Hide Post
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
 
Posts: 272 | Location: Kalamazoo, Michigan | Registered: September 30, 2010Report This Post
Member
posted Hide Post
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.
 
Posts: 17 | Registered: December 20, 2010Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] JS Command populateDynamicCtrl

Copyright © 1996-2020 Information Builders