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

fx:script not loading file defined in the source attribute in JDK8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • None
    • javafx
    • $ java -version
      java version "1.8.0-ea"
      Java(TM) SE Runtime Environment (build 1.8.0-ea-b108)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b50, mixed mode)

      If the script is inside in a separate file and pointed out through the source attribute, it is not loaded.

      <fx:script source="myapp.js" />

      When defining an FXML interface with <fx:script>, it only works when the script is bundled inside the tag.

      <fx:script>
          var System = Packages.java.lang.System;

          function handleButtonAction(event) {
             System.out.println('You clicked me!');
          }
      </fx:script>

            msladecek Martin Sládeček
            bborges Bruno Borges (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: