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

fxml: fx:controller: public handler should be visible without "@FXML" annotation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx2.0
    • fx2.0
    • javafx
    • None
    • scrum 2681

      attempt to load public fx:contoller method without "@FXML" annotation leads to
      Controller method "handleButtonAction" is not visible to markup.

      with "@FXML" - works fine.
      sample files:
      ________________________________________________
      <VBox fx:controller="com.foo.MyController"
      xmlns:fx="http://javafx.com/fxml">
      <children>
      <Button text="Click Me!" onAction="#handleButtonAction"/>
      </children>
      </VBox>
      _____________________________________________
      package com.foo;
      public class MyController {
      public void handleButtonAction(ActionEvent event) {
      System.out.println("You clicked me!");
      }
      }
      _________________________________________________

            gkbrown Greg Brown (Inactive)
            vshubov Victor Shubov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: