SFXKeyBindings
SFXKeyBindings is a helper class for SFXBeanAdapter. It provides Bindings from beans to ui representations.
It contains convenience functions for adding keys to FXBean Adapter and for conversion.
Code Sample
FXML Snippet
<Label id="person"/>
<TextField id="name"/>
<TextField fx:id="age"/>
Scala ViewController Snippet
source// Bindings lookup by id or fx:id in fxml
val bindings = SFXKeyBindings("id", "name", "age")
// Expression Binding Example
bindings.add("person", "${sfx:i18n('personText', _self.name(), _self.age())}")
adapter.addBindings(bindings)
Create Bindings
Bindings are created by the value of the id or fx:id attributes in the fxml file.
Note
If node lookup from appication root node does not work, you can fix it by adding a parent Node to FXBeanAdapter.
source@FXML
var personBox: VBox = _
Add Converter
sourceadapter.addIntConverter("age")
1.1.3*