FXML Nashorn Jira Issue Marked Resolved But Is Not - RT-31776
TA Hubbard
tahubbard at fxmlguide.com
Wed Aug 21 15:59:52 PDT 2013
Mr. Bair:
The following FXML script is fundamental to FXML according to
"Introduction To FXML"
(http://docs.oracle.com/javafx/2/api/javafx/fxml/doc-files/introduction_to_fxml.html#scripting),
but is no longer compiling without errors (since jdk8-b91 through b103):
<?language javascript?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<VBox xmlns:fx="http://javafx.com/fxml">
<fx:script>
importClass(java.lang.System);
function handleButtonAction(event) {
System.out.println('You clicked me!');
}
</fx:script>
<children>
<Button text="Click Me!" onAction="handleButtonAction(event);"/>
</children>
</VBox>
The Jira (RT-31776) states that the issue is resolved, but it isn't. In
fact, trying to compile with the language processing instruction
<?language javascript?> produces a NullPointerException. All other
error messages are Nashorn related.
A Nashorn rep states that it is because of their non-support of
importClass. He recommends mozilla_compat.js. However, FXML documents
are not compiling even without the importClass 'and' they are producing
null pointer messages with just the inclusion of the language processing
instruction.
If this FXML feature was deprecated with Rhino, can you officially state
and document it, or offer an official solution?
Thanks.
TAH
More information about the openjfx-dev
mailing list