/ Published in: Groovy

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import groovy.swing.SwingBuilder import groovy.beans.Bindable class MyModel { } gridLayout(cols: 1, rows: 2) // OLD - does not display until assigned a different value than the original // label(text: bind(source: model, sourceProperty: "count", converter: { v -> v? "Clicked $v times": ''})) // NEW - this works label( text: bind(source: model, sourceProperty: "count", converter: { v -> "Clicked $v times" }) ) } }
URL: http://groovy.codehaus.org/Swing+Builder
Comments
