JDK-8238080 : FXMLLoader: if script engines implement javax.script.Compilable compile scripts
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: fxml
  • Affected Version: openjfx15
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2020-01-24
  • Updated: 2020-07-21
  • Resolved: 2020-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
openjfx15Fixed
Related Reports
CSR :  
Description
ADDITIONAL SYSTEM INFORMATION :
All systems.

A DESCRIPTION OF THE PROBLEM :
FXMLLoader is able to execute scripts in Java script languages (javax.script.ScriptEngine implementations) if such a Java script language gets defined as the controller language in the FXML file. 

If a script engine implements the javax.script.Compilable interface, then such scripts could be compiled and the resulting javax.script.CompiledScript could be executed instead using its eval() methods.

Evaluating the CompiledScript objects may help speed up the execution of script invocations, especially for scripts defined for event attributes in FXML elements (e.g. like onMouseMove) which may be repetitevly invoked and evaluated.



Comments
Closing this as verified fix per submitter confirmation.
21-07-2020

Changeset: 45c9854c Author: Rony G. Flatscher <Rony.Flatscher@wu.ac.at> Committer: Kevin Rushforth <kcr@openjdk.org> Date: 2020-06-30 11:56:14 +0000 URL: https://git.openjdk.java.net/jfx/commit/45c9854c
30-06-2020