Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8090971

@FXML annotated fields are not accessible to namespace

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u5
    • javafx

      FXMLLoader allows to bind properties defined within FXML document as described in "Introduction to FXML", paragraph "Expression Binding" (http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#expression_binding). That works fine for me.

      Please consider to allow binding to properties or bindings defined in associated controller class and annotated by @FXML there. For provied code sample, the purpose for the feature is to provide additional control over GUI elements through controller. Sample shows trivial int to string conversion performed by controller. Original application evaluates selection of items within TreeView to enable/disable parts of functionality available through toolbar buttons and context menu, and it is not so simple in code as shown here.

      In the sample provided, desired feature is to provide coded feedback to controls (button "Test Button Of Interest" and text field below it, shown in rows #2 and #3). See StringProperty display and BooleanBinding disableButton in BindingExamController.java. Original application employs work-around by making required binding directly by code in controller, within initialize() method.

      See also RT-14880

            Unassigned Unassigned
            nvarankinjfx Nikolai Varankine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported: