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

FXML: Known Limitations in SceneBuilder

XMLWordPrintable

      The following limitations apply to SceneBuilder 1.0 FCS:

      1. 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.

      2. 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.

      3. 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.

      4. 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.

      5. SceneBuilder will not be able to load FXML files which define event handlers on FXCollections - as implemented by RT-17714.

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

              Created:
              Updated:
              Resolved:
              Imported: