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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Just curious...
 Login/Join
 
<Shane>
posted
Is it possible to have the default selection on a dynamic multi-select listbox be generated by WebFOCUS after the listbox values have been populated?

Shane
 
Report This Post
Expert
posted Hide Post
Shane,

Think about where the select box is - it is in your HTML file and not WebFOCUS. This should enable you to answer your own question Smiler

WebFOCUS might be being used to populate the listbox but the data is passed to the client browser where JavaScript takes over.

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
<Shane>
posted
Tony,

Thanks for the reply. However when we try to use JavaScript, we found out that it executes before the WebFOCUS code does. Hence, we get javascript errors because there's no value in the listbox at runtime.

Shane
 
Report This Post
Expert
posted Hide Post
Shane,

This is correct. If you use the HTML painter and therefore the IBI Javascript modules, then when your HTML page loads it runs a series of functions that populate the various controls on your page. It does this by retrieving an XML data file from WebFOCUS. This XML file is then parsed into pairs of data values that are used to poplate the list box, one for Value and one for Display.

Once these processes have been run then you should be able to run your own function to make the selections that you require.

In your HTML code you should have a section that looks like this -
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}
//End function window_onload
</SCRIPT>

All you have to do is add your function calls after the TODO comment. Smiler

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
Master
posted Hide Post
I have not tried this but it is something I heard. If you call the html page and pass the name=value parameters on the URL it set the default values. Have not tried but and do not hold me to it. Please let us know what happend when you try it.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Guru
posted Hide Post
AlanB posted some javascript to do exactly what you want - it even takes care of the delay caused by WF populating the listbox dynamically.

Also if you read the whole of the linked thread, you'll see that there are plans to do this via WF in 764.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
 
Posts: 253 | Location: Melbourne, Australia | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders