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 have requirement on click of a button it has to load the data in double list control dynamically from FEX ,similarly have numerous buttons it has happen for all buttons on click .
Any help & suggestion would be great help
e.g. Account Number for the Account Number Button, in the listing will place that value in the Selections Box(i.e double list control ).
TABLEF FILE ACCOUNT SUM FST.ACCOUNT BY ACCOUNT ON TABLE PCHOLD FORMAT XML ENDThis message has been edited. Last edited by: <Emily McAllister>,
7.6.10 Windows HTML, PDF, Excel etc DevStudio/Webfocus/Focus ETL 7.6.10 SQL Server 2000 / 2008 DB2 ,Oracle
Posts: 5 | Location: Dallas,TX | Registered: July 09, 2010
Here's an example of what you want to do using the CAR table provided by IBI...
I created three FEX files: country.fex, car.fex and model.fex. They are on the data server (EDASERVE) in an application called "BIDEV". They look like this:
-* Generate Country data
TABLE FILE ibisamp/car
PRINT COUNTRY
ON TABLE PCHOLD FORMAT XML
END
-RUN
-* Generate Car data
TABLE FILE ibisamp/car
PRINT CAR
ON TABLE PCHOLD FORMAT XML
END
-RUN
-* Generate Model data
TABLE FILE ibisamp/car
PRINT MODEL
ON TABLE PCHOLD FORMAT XML
END
-RUN
Here is the hyperlink to test the country FEX file (It won't work for you, it's not on the Internet):
The other two FEX procedures do the same, just with different data and a slightly different hyperlink.
I have a double listbox named "customselect1" and three push buttons called "country", "car" and "model".
The following JavaScript code should do what you want to do. It uses Ajax to call on hyperlinks to get the XML data after each button is pushed. I put comments in the code that explain further.
// *** Start of the button functionality ***
function country_onclick(event) {
callServer('country');
}
function car_onclick(event) {
callServer('car');
}
function model_onclick(event) {
callServer('model');
}
// Prepare for Ajax calls
var xmlHttp = false;
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
// Determine which FEX procedure to call, then call it
function callServer(which_button) {
var url = "/ibi_apps/WFServlet" + "?" + "IBIF_ex=BIDEV/" + which_button + ".fex";
xmlHttp.open("GET", url, true);
xmlHttp.onreadystatechange = domupdate;
xmlHttp.send(null);
}
// Update the double listbox with the new information
function domupdate() {
if (xmlHttp.readyState == 4) {
if (xmlHttp.status == 200) {
var responseXML = xmlHttp.responseXML;
var i;
// Remove any existing selections from the left side of the double listbox
var list_options = document.getElementById("customselect1_selectfrom");
for (i = 0; i < list_options.length; i++) {
while (list_options.hasChildNodes()) {
list_options.removeChild(list_options.firstChild);
}
}
// Remove any existing selections from the right side of the double listbox
list_options = document.getElementById("customselect1_selectto");
for (i = 0; i < list_options.length; i++) {
while (list_options.hasChildNodes()) {
list_options.removeChild(list_options.firstChild);
}
}
// Add new selections to the left side of the double listbox
var trs = responseXML.getElementsByTagName("tr");
for (i = 0; i < trs.length; i++) {
var tds = trs[i].getElementsByTagName("td");
var option = document.createElement("option");
option.text = tds[0].firstChild.nodeValue;
document.getElementById("customselect1_selectfrom").add(option);
}
}
}
}
This message has been edited. Last edited by: Squatch,
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015