FXML Patterns / best practices
Werner Lehmann
lehmann at media-interactive.de
Thu Feb 23 06:28:43 PST 2012
Michael,
I believe you are up to the same thing as I am - almost:
On 23.02.2012 14:58, Dr. Michael Paus wrote:
> root = FXMLLoader.load(getClass().getResource("myview.fxml"));
>
> firstNameField = (TextField)root.lookup("#firstNameField");
Here I would prefer to have a choice that the loader accepts "this" as
an instance of PersonView and then wires up the firstNameField etc
exactly as it does for a controller today - instead of creating a new
instance, requiring me to lookup everything again. In this way the fxml
loader really just replaces manual control creation with fxml specified
controls.
Please see my proposal at the following URL for a way to achieve this in
the current framework (with 2.1):
https://forums.oracle.com/forums/thread.jspa?threadID=2350343
Rgds
Werner
More information about the openjfx-dev
mailing list