Focal Point
[CLOSED]Multisource tree control challenges

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9317003386

August 03, 2016, 11:22 PM
WFDevConsultant
[CLOSED]Multisource tree control challenges
We are using Multisource tree control to do the tree structure and to allow multiselect on the data.

The challenges we are facing are below.

1) It is not getting reset when we click the RESET button after no activity on the portal for more than 30 minutes. All other controls are getting reset.

2) When I try to get the selected value from the multisource tree control, it gives all the values from bottom to top. We just want to grab the selected value.

Anyone faced these issues. How can I resolve it?

This message has been edited. Last edited by: <Emily McAllister>,


8.2.06
Windows, All Formats
August 04, 2016, 04:39 AM
Neelima
Hi

As per knowledge, for 2nd Point. you can do following code:-

var oRadio = document.getElementsByName('multisourcetreecontrol1');

for(var i = 0; i < oRadio.length; i++)
{
if(oRadio[i].checked)
{
alert(oRadio[i].value);
document.getElementById('edit1').value=oRadio[i].value;
}
}

Thanks
Neelima


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
August 04, 2016, 07:56 AM
gregv
Have you tried IbComposer_getCurrentSelection('controlid',[layer])?



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8
August 04, 2016, 08:46 AM
Francis Mariani
1) Which version of WebFOCUS? 7.7.03 or 8.0.07?
2) If 8.0.07, Developer Studio or Application Studio?


As gregv suggests, you should use the HTML Composer "API" functions if you used the HTML Composer Tree Control. In Developer Studio 7.7.05 I couldn't get the multi-select to work, so we used a jQuery Tree Control, to complicated to explain here. Perhaps v8.0.07 is better...

IbComposer_getCurrentSelection('controlID', [layer]);

controlID - Is the unique identifier of the control from which values are obtained.
layer - Is an optional parameter used to specify the layer number in a multi source Tree control if a Multi source Tree control is being used. The layer number starts with 1 for the first layer.


If your Tree Control is chained to another control (or vice versa), use External procedures instead of Embedded procedures - I've had better luck with External procedures.


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
August 04, 2016, 09:41 AM
Neelima
Cool.. Gregv And Francis!!

Can I get the tutorial link for such HTML Composer API.

Thanks In Advance..

Regards,
Neelima


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
August 04, 2016, 10:12 AM
WFDevConsultant
Version : 8.1.05
Application Studio

Already I am using IbComposer_getCurrentSelection('ControlID',[layer])

I am able to get the values but the problem is, it is giving me the value from bottom to top.

For example, my hierarchy is like A-->A1-->A11

If I select 'A11' then I want to get only A11 but right now it is giving me A, A1, A11.


8.2.06
Windows, All Formats
August 04, 2016, 10:18 AM
Francis Mariani
App Studio 8.1.05: WebFOCUS Release 8.1 Version 05 > App Studio > WebFOCUS App Studio Reference Guide > Creating HTML Pages in WebFOCUS App Studio > Using JavaScript Code With HTML Canvas Pages

App Studio 8.0.08: WebFOCUS Release 8.0 Version 08 > App Studio > WebFOCUS App Studio Reference Guide > Creating HTML Pages in WebFOCUS App Studio > Using JavaScript Code With HTML Canvas Pages

The similar documentation for Developer Studio seems to be missing in these online links.


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