Thursday, February 10, 2011

Bidirectional binding in Griffon

It took me a lot of searching to figure out how to do bidirectional binding in Griffon.

class PersonModel {
    @Bindable String firstName
}

textField(id: 'firstName', text: bind(target: model, targetProperty: 'firstName', mutual: true)

The key word is "mutual: true"

Here is where I got the info from. It is at the bottom of the article.

http://www.jroller.com/aalmiray/entry/building_rich_swing_applications_with2

No comments: