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

FXMLLoader should load FXML properties of Controller base class as well

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.1
    • fx2.0
    • javafx
    • b42

      Currently FXML does not seem to map properties of the base class that a Controller extends, even if these properties are annotated with @FXML.

      If we have this:

      public class MyBaseController
      {
          @FXML
          protected Label myLabel1;
      }


      And this:

      public class MyController extends MyBaseController
      {
          @FXML
          protected Label myLabel2;
      }


      And then we load some FXML that references MyController as its controller, it seems only the direct properties on the Controller class are mapped (i.e. 'myLabel2') and not the inherited ones (i.e. 'myLabel1'). Ideally it would load both.


            mkubec Milan Kubec
            dzwolenskjfx Daniel Zwolenski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: