[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Question ad javax.script deployment scenarios ...
From:       "Rony G. Flatscher" <Rony.Flatscher () wu ! ac ! at>
Date:       2016-11-17 16:34:01
Message-ID: 4f0286ea-77e4-68ff-4910-4ccddd2a9bf6 () wu ! ac ! at
[Download RAW message or body]

Not having found a documentation or references as how javax.script scripting languages get employed
in JavaFX, I was wondering whether there is an up-to-date, current documentation of that support, if
any at all?

E.g. it seems that it is not possible to have different scripting engines execute event handlers for
the same document (there seems to be no type-attribute or language-attribute available that denotes
the scripting language to use to execute the code supplied in an event-attribute like onAction).

Or, at least in JavaFX 8, the filename is not supplied for external files, although it could be
supplied (and would be important for debugging) like the name the source-attribute of a fx:script
element (e.g. <fx:script source="somescriptfile.type"/>). [One would merely have to add an attribute
to the ScriptContext.ENGINE_SCOPE Bindings under the key ScriptEngine.FILENAME, ie.
"javax.script.filename".]

There would be more, maybe interesting features that javax.script defines that could be taken
advantage of (like defining arguments to supply in certain situations which would merely need to
employ the key ScriptEngine.ARGV, ie. "javax.script.argv" for the Object array to store in the
ScriptContext.ENGINE_SCOPE Bindings.

---rony

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic