hudsonb
01/02/2019, 8:29 PMView
. Would the following class make sense as the model for the items in my tree:
data class Demo(val title: String, val view: KClass<out UIComponent>)
class DemoModel : ItemViewModel<Demo>() {
val title: StringProperty = bind { SimpleStringProperty(item?.title) }
val view: ObjectProperty<KClass<out UIComponent>> = bind { SimpleObjectProperty<KClass<out UIComponent>>(item?.view) }
}
When a demo is selected in the tree I could then find(selecetedDemo.view)
to display the demo.