【发布时间】:2010-02-21 06:48:36
【问题描述】:
我的 Griffon App(或 groovy swingBuilder)视图中有 2 个组合框
country = comboBox(items:country(), selectedItem: bind(target:model, 'country',
value:model.country), actionPerformed: controller.getStates)
state = comboBox(items:bind(source:model, sourceProperty:'states'),
selectedItem: bind(target:model, 'state', value:model.state))
控制器中的 getStates() 根据所选国家/地区填充模型中的 @Bindable List states = []。
上面的代码没有给出任何错误,但从未填充过状态。
我将状态从 List 更改为范围对象(虚拟),它给了我一个错误 MissingPropertyException No such property items for class java.swing.JComboBox。
我在这里遗漏了什么吗?在 Nabble 上有几个与此相关的条目,但没有什么是清楚的。如果我有一个标签而不是第二个组合框,上面的代码就可以工作。
【问题讨论】:
标签: groovy combobox griffon swingbuilder