我正在尝试以下格里芬代码
模特上的:
@Bindable boolean hello1 = false
在视图上:
checkBox(id:1,text:'hello1',constraints:'wrap',selected:bind(target:model,targetProperty:'hello1'))
但确实说
错误org.codehaus.griffon.runtime.builder.UberBuilder - 构建test时出错.TestView@1132e76 groovy.lang.MissingMethodException:没有方法签名:java.lang.Object.setVariable()适用于参数类型:(java.util.Collections $ EmptyMap,java.util.Arrays $ ArrayList)values:[[:], [1,javax.swing.JCheckBox [,0,0,0x0,无效,alignmentX = 0.0,alignmentY = 0.5,border = javax.swing.plaf.synth.SynthBorder @ b101cf,flags = 288,maximumSize =,minimumSize =,首选大小=,=的DefaultIcon,disabledIcon =,disabledSelectedIcon =,余量= javax.swing.plaf.InsetsUIResource [顶= 0,左= 0,底部= 0,右= 0],的paintBorder =假,paintFocus =真,pressedIcon =, rolloverEnabled = true,rolloverIcon =,rolloverSelectedIcon =,selectedIcon =,text =]]] 8-mar-2012 12.03.41 groovy.util.FactoryBuilderSupport createNode AVVERTENZA:找不到名称'setVariable'的匹配
我不知道这笔交易是什么,我从互联网上的工作示例中复制了这个......
答案 0 :(得分:1)
使用字符串而不是数字作为id:property的值,如此
checkBox(id:'c1',...)