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

Custom controls that call HTMLEditor#setHtmlText or HTMLEditor#getHtmlText during initialization fail to import into Scene Builder.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 8u40
    • 8
    • javafx
    • None
    • Windows 8.1 (64bit), Java 8u5 (64bit), Scene Builder 2.0 GA.

      When a custom control contains an HTMLEditor, Scene Builder can't load the control. The JAR Analysis Report indicates that calls to setHtmlText(...) or getHtmlText(...) are causing a NullPointerException. This happens regardless of whether or not the call is made from FXML or the controller's initialize block.

      Using the same control outside of Scene Builder works as expected. I have posted a sample project here.

      https://bitbucket.org/ryanjaeb/broken-fxml-control

      Steps to reproduce:

      1. Check out the above project.
      2. Run "gradlew jar"
      3. Attempt to import the JAR file from build/libs into Scene Builder.
      4. The JAR Analysis Report will indicate an exception loading the control.

      ...
      ...
      Caused by: java.lang.NullPointerException
      at javafx.scene.web.HTMLEditor.setHtmlText(HTMLEditor.java:86)
      at custom.CustomPaneController.initialize(CustomPaneController.java:11)
      ... 32 more

            eleponn Eric Le Ponner
            rjjfx Ryan J (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: