context
field in your script. For example: public void clicked() { context.echo("Hello World"); }
public class ScriptContext |
---|
Modifier and Type | Method and Description |
---|---|
void | abort(String message)
Abort the current script. The Scripting engine will use the throwable exception to stop the execution
|
void | echo(String message)
Echo a message
|
void | echo(Number number)
Echo a numeric value
|
void | error(String message)
Error a message
|
XULScriptHelper | getHelper()
Return the script helper
|
File | getPath(String path)
Return the absolute path of a file defined relative to the script file
|
File | getScriptFile()
Return the script file
|
ScriptLogger | getScriptLogger()
Return the associated ScriptLogger
|
abort(String message)
will abort the script.
context
field in the script. public void clicked() { context.echo("My value:" + value); }
XULScriptContext
for all the scripts by ScriptManager.setScriptContext(XULScriptContext).XULScriptHelper
, you should define a custom XULScriptContext
and implement the XULScriptContext.getHelper() with your own XULScriptHelper
implementation.Copyright 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence