21. NashornResourceReference - klopfdreh/wicket-components-playground GitHub Wiki
The NashornResourceReference can be used to execute javascript via post request on server side and make context variables of the server scope available to the script.
Available in Version 7.2.0 of a wicketstuff project. Dependency:
<dependency> <groupId>org.wicketstuff</groupId> <artifactId>wicketstuff-nashorn</artifactId> <version>/version/</version> </dependency>
Code: https://github.com/wicketstuff/core/tree/master/nashorn-parent
Documentation: https://github.com/wicketstuff/core/wiki/NashornIntegration
The Reference is highly dangerous, because users can cause memory leaks and high CPU consumptions, but offers a way so that third party users can write a script against an API