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] HTML Composer: How to reset double-list control?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] HTML Composer: How to reset double-list control?
 Login/Join
 
Expert
posted
I'd like to use a javascript call to reset a double-list control when I click on a button.

I tried IbComposer_ResetDownChainControls, but that doesn't work, as it's not a chained control. I'd rather not have to make the double-list control chained to a dummy parent.

Thanks,

This message has been edited. Last edited by: FP Mod Chuck,


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
Expert
posted Hide Post
Since this doesn't work:
IbComposer_ResetDownChainControls('customselect7' );
I tried this, which appears to reset the double-list - setting the control to any non-existent value will do the job:
IbComposer_setCurrentSelection('customselect7' ,'x');
The one thing I don't like is that the previously selected values are put at the bottom, which means I would need to use javaScript or jQuery to sort the selectfrom list box.


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
quote:
The one thing I don't like is that the previously selected values are put at the bottom, which means I would need to use javaScript or jQuery to sort the selectfrom list box.


Did you find anything out about sorting the values correctly from the selectfrom?


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
Matt, unfortunately not.

In a previous project, onInitialUpdate I used jQuery to save the selectfrom listbox in a hidden listbox and the reset list box button would copy that hidden listbox back to selectfrom. A little convoluted but it worked and you don't really need to use jQuery...


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
Platinum Member
posted Hide Post
quote:
IbComposer_setCurrentSelection('customselect7' ,'x');


HI,
I tried the method below.
But it pushes 'empty string' to the right box of the double list.
Is there a way around it?


var arr=[];
arr.push('');
IbComposer_setCurrentSelection('customselect1', arr, false);


WebFOCUS 8202M
 
Posts: 167 | Location: Montreal | Registered: September 23, 2014Report This Post
Expert
posted Hide Post
BM, I believe I was in v7.7.03 when I posted my workaround. Sadly, often these workarounds don't work in the next release.


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
Virtuoso
posted Hide Post
I would think that just the below should work to reset the selection:
IbComposer_setCurrentSelection('customselect1', [], false);


Are you sure the unique id of that field is indeed 'customselect1'? Are you seeing any javascript errors in the console (F12)?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Hi,
here is the solution.
document.getElementById('customselect1_selectto').options.length = 0;


Thanks


WebFOCUS 8202M
 
Posts: 167 | Location: Montreal | Registered: September 23, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] HTML Composer: How to reset double-list control?

Copyright © 1996-2020 Information Builders