I’m trying to bind a datatable with a form inside of a popup window that’s rendered as a subview. I can’t seem to figure out how to get a pointer to the actual form inside the popup window.
So, I have a datatable defined, along with a subview for the popup. The form is inside the popup:
import {JetView} from "webix-jet";
import {data} from "models/records";
import {popup} from "views/popup";
export default class DataView extends JetView {
config() {
var datatable = { view: "datatable", autoConfig: true };
var button = { view:"button", value:"Show Window 2", click:() => this.win.showWindow() };
return {
cols:[{
rows:[
datatable,
button
]},
{ $subview:true, name:"popup", popup:true }
]
};
}
ready() {
var list = this.getRoot().queryView({view:"datatable"});
//this is where I'm having trouble. This next line doesn't work.
this.getSubView("popup").queryView({view:"form"}).bindWith(list);
}
init(view) {
view.parse(data);
}
};
The form inside the popup has this method defined:
bindWith(list) {
this.getRoot().bind(list);
}
Anyone know how to correctly get the pointer to the form, so I can call the bindWith method?
Thanks, Dan