Generated Object
An interlal class that currently should not be relied on.
Attributes
- source <Object> The object that trigers the binding update
- sourceProperty <String> A property that is read for the update and whose change triggers the update
- sourceEvent <String> The event name trigger an update
- sourceValue <Closure> A closure providing the value whn sourceEvent triggers
- target <Object> The object to be updated when a bound value changes
- targetProperty <String> The property on the target update to which the queried value will be written
- validator <Closure> If the closure returns null or Boolean.FALSE then a triggered binding will be canceled
- converter <Closure> Takes the queried value and converts it to another object to be written to the targetProperty
Content
bind accepts no content
Usage
bind can be used as a stand alone element or as a value for any attribute of any object.
When used as an attribute value the target and targetProperty values implicitly become the current object being constructed and the property being written to.
Until the extrenal API is finalized, it is not recommeneded to use the object returned from bind
Examples
swing.frame() {
panel {
textField('Change Me!', id:'tf')
button(text: bind(source:tf.document, sourceEvent:'undableEditHappened', sourceValue:
Unknown macro: {tf.text}
)
}
}
Labels