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

Graph loaded from FXML with fx:include ignores the assigned fx:id - a regression from JavaFX 2.2

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P5 P5
    • 8u20
    • 8u20
    • javafx
    • Windows 7 64-bit
      JAva 8u20 b23

      I have an FXML file for a "wizard" style dialog. It has two "pages" both of which are children of a StackPane, but only one is visible at a time. The first page is in the FXML as a GridPOane child, the second is an AnchorPane via an include, e.g.:
          <StackPane fx:id="stackPane">
            <children>
              <GridPane fx:id="pageOne" ... >...</GridPane>
               <fx:include fx:id="pageTwo" source="secondPage.fxml" visible="false" />
            </children>
          </StackPane>

      I hide or show the correct page by checking the id and making that node visible and the other invisible.

      With Java 7 (JavaFX 2.2.65) this works correctly. With Java 8u20 the fx:include node has an id of "AnchorPane" instead of the assigned fx:id of "pageTwo"

            jgiles Jonathan Giles
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: