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

Known FXML limitations in SceneBuilder 1.x

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • None
    • 7u6
    • javafx

    Description

      INPUT FOR RELEASE NOTES:

      The following limitations apply to SceneBuilder 1.1:

      [This is not an issue we will fix, but by design. Will be removed from here, and should be explained in the product doc:
      FXML containing fx:script elements may not load if variables created by the scripts are referred to by objects in the scenegraph. This is because fx:script are not executed when loading an FXML file in the SceneBuilder.]

      1. File and URL paths must be either absolute - starting with <protocol>:/ - or relative to the FXML file. Resources paths relative to the application class path will not work properly as SceneBuilder doesn't know anything about the application context.

      In other words, this will work:
      <AnchorPane>
          <stylesheets>
                <URL value="@application.css"/>
           </stylesheets>
      </AnchorPane>

      But this will not:
      <AnchorPane>
          <stylesheets>
                <String fx:value="/my/application/application.css"/>
           </stylesheets>
      </AnchorPane>

      Note that SceneBuilder will save all links to files as paths relative to the FXML location. This is a prerequisite to obtain a portable FXML file, but it is not sufficient: see DTL-4905 which contains further input.

      2. SceneBuilder only supports editing file whose root object is an instance of Node or Tab.
          When the root object is an instance of Tab, SceneBuilder acts as if the scenegraph root were the tab content.

      3. SceneBuilder will load files that contain fx:copy elements, but will not be able to preserve them: when saving, the copied object will be inlined, and the user will be forced to use Save As rather than Save the first time.

      Attachments

        Issue Links

          Activity

            People

              eleponn Eric Le Ponner
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: