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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      scrum 2681

    • Subcomponent:

      Description

      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!");
      }
      }
      _________________________________________________

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: