Tag: 检票口

PropertyModel不能与Kotlin的私人领域一起使用get()

如果一个kotlin的模型有一个字段: class MyModel { private val theValue: Double get() { return 1.0 } } 并在检票页面: new PropertyModel(model , “theValue”) 它会失败: WicketRuntimeException: Property could not be resolved for class: class MyModel expression: theValue 解决方案:删除私人修改器: class MyModel { val theValue: Double get() { return 1.0 } } 有没有办法解决这个问题(保持私人修改)? (wicket 7.9.0,Kotlin 1.2)