Oracle docs aren't very clear on this, google and bing neither.
Can I (like in WPF) bind to a model in FXML skipping the binding code in Java?
I did see, for a brief flash, a syntax like ${object.field} on a blog somewhere but I can't be sure.
LATER EDIT : I have been doing XAML development (WPF, Silverlight, Windows Phone) for quite a few years and I've been accustomed to expressing databindings in the markup. Furthermore I've read in a 2011 article on FXExperience that
I could turn things around a little bit and move the binding into the FXML document. This would allow tools to handle data binding in addition to layout. Note that the following code does not work today because bidirectional bindings are not supported in FXML, but we are working on fixing that.
Practically it was like :
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import fxmlapp.Model ?>
<VBox fx:id="root" xmlns:fx="http://javafx.com/fxml" fx:controller="fxmlapp.Sample">
<fx:define>
<Model fx:id="model" />
</fx:define>
<children>
<TextField fx:id="firstNameField" text="${model.person.firstName}" />
<Label fx:id="messageLabel" text="${model.person.firstName}" />
</children>
</VBox>
Since it was in a 2011 article things could have been implemented in the meanwhile, but have not found any evidence in this direction. Therefore, after careful searching, I decided to ask here.