Martin Borzan
11/14/2021, 9:39 AM//inside the Button Fragment
...
setOnMouseClicked {
find<TabPaneView>().openTab(persistentFolder) //persistentFolder is my Model bound to the Fragment
}
...
TabPaneView:
class TabPaneView : View("Logs") {
override val root = tabpane {
tabClosingPolicy = TabPane.TabClosingPolicy.ALL_TABS
}
fun openTab(persistentFolder: PersistentFolderModel) {
root.tab(persistentFolder.nameProperty.value) {
}
}
}
I don't know if this is the way to go here. Ideally I'd like to create a Fragment that holds a Tab as its root but that seems impossible since Tab can't be a root element.