Hello everyone,
I´m struggling with loading data into another component. In my case I have two trees, and when I click on an item in the one tree it should load the data into the second. This is what I have right now:
// The first tree:
var remoteDirFiles = {
view: “tree”
};
var remoteDirFolders = {
cols: [
{ // The second tree:
view: "tree",
width: 200,
url: '/RemoteDir',
on: {
onBeforeOpen: function (id) {
var fc = String(this.getFirstChildId(id));
if (fc.indexOf('/') < 0) {
this.remove(fc)
this.loadBranch(id);
}
},
onItemClick: function (id) {
// And this is unfortunatelly not working:
remoteDirFiles.load('/RemoteDir?parent=' + id);
}
}
},
{view: "resizer"},
remoteDirFiles // The first tree is connected to the layout here
]
};
var remoteDirTab = {
view: "tabview",
cells: [
{
header: "Remote Drive",
body: remoteDirFolders // Both trees layout is attached here
}
]
};
Hopefully you understand what this is all about. Any hint is highly appreciated.
Thx in advance,
Martin