【发布时间】:2014-10-30 00:25:22
【问题描述】:
在我的模型中..
@Bindable contentList = ['A','B','C','D','E','F','G','H','J','K','L','M']
在我看来
def offset = 0
2.times { outer ->
6.times { inner ->
panel(background: Color.white,
border: BorderFactory.createLineBorder(Color.black),
constraints: inner.equals(5) ? 'grow,wrap' : 'grow') {
label(text: bind {model.contentList[offset++]},
font: new Font("Sans Serif",
Font.PLAIN, 18))
}
}
}
在初始加载时效果很好,但是当我尝试更新控制器中数组中的元素时 它没有反映在屏幕上.. 有没有办法绑定到数组元素?
谢谢
【问题讨论】: