[CLOSED] Apply Chaining to only one List Box in a Double List Box.
I have a ListBox1 and DoubleListbox1 in an HTML Page dynamically chained to each other. As you guys know, a double list box has two components SELECTFROM and SELECTTO (essentially two individual list boxes populated with some controls for choosing the order of list or drag or drop).
As seen in the screenshot below, When i select an item in ListBox1 the values in SELECFROM of DoubleListbox1 changes dynamically due to the chaining. Then i drag or double click items in SELECTFROM to SELECTTO using the controls in middle.
My issue is that once i change my selection in ListBox1, the values of SELECTFROM is changed and all the previously selected or dragged items in SELECTTO refreshes as soon as i change selection in parent.
Bottom line, i would only like to chain Listbox1 with SELECTFROM of DoubleListbox1 and keep SELECTTO independent of any changes. Please suggest.
ThanksThis message has been edited. Last edited by: FP Mod Chuck,
I see your dilemma but no idea how to fix it. I think it is protecting you from having a bad value in the selectto side when a change happens in the selectfrom side. Maybe someone else has an idea but you will probably have to ask techsupport if this is possible.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
October 14, 2019, 04:22 PM
SeyedG
quote:
Tharun
Hi Tharun, Do you still have this issue? I remember a couple of years ago, IBI guru Barry S. showed me a work-around that I believe will help you solve your problem too. All you need is add a button, a second double list box (not chained) to hold the final result and some JavaScript code. If you need additional information, let me know.
WebFOCUS 8.0.09 App Studio 8009 Linux Kernel-2.6 DBMS: Oracle 11g all output (Excel, HTML, AHTML, PDF)
October 15, 2019, 10:15 AM
tomatosauce
Hi Seyed,
I had opened a tech support case with IBI but no update yet. If you could provide any more details of the solution working for you, that would be very much helpful.
1. Add a button set the CSS property to ‘IBI_btn-right’ to get a right arrow on button.
2. Add the following JavaScript code to the button you just added
if(typeof(bRuntime) != 'undefined') {
// TODO: Add your inline runtime code here
}
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
function onInitialUpdate(){
IbComposer_showHtmlElement('customselect2',true);
}
function addOptions(){
values = IbComposer_getCurrentSelectionEx('customselect1');
for (var i=0; i < values.length; i++){
var Value = values[i].getValue();
var Text = values[i].getDisplayValue();
addItems(Value, Text);
}
}
function addItems(Value, Text) {
var sel = IbComposer_getComponentById('customselect2_selectto');
var opt = document.createElement("option");
opt.appendChild(document.createTextNode('New Option Text'));
opt.text = Text;
opt.value = Value;
sel.appendChild(opt);
}
//Begin function button12_onclick
function button12_onclick(event) {
var eventObject = event ? event : window.event;
var ctrl = eventObject.target ? eventObject.target : eventObject.srcElement;
// TODO: Add your event handler code here
addOptions();
setTimeout(function () {IbComposer_ResetDownChainControls('customselect2');},200);
}
//End function button12_onclick
3. Add your second double list box customselect2) Under properties, change ‘Keep Select Values’ to ‘Yes’.
I believe this is all. Give this a try. Keep in mind that I tried this in version 8009, but it should work for your version as well.
WebFOCUS 8.0.09 App Studio 8009 Linux Kernel-2.6 DBMS: Oracle 11g all output (Excel, HTML, AHTML, PDF)