orangy
class MyView() : View() {
private val rootProperty = modelProperty.objectBinding {
TreeItem(it as MyItem?)
}
override val root = vbox {
addClass(Styles.wrapper)
treeview<MyItem> {
rootProperty().bind(rootProperty)
cellFormat { text = it.toString() }
populate {
val value = it.value
when (value) {
is ContainerItem -> value.children
else -> emptyList()
}
}
}
}
}
First time it binds just fine, but when otherProperty
changes (through couple of other bindings), root node changes, but children are not populated. It just displays root node without expansion button and no children visible.