Wicket Console for JVM 1.8+
Key features:
- Very small size (<35Kb)
- Ajax enabled
- Contextual
- ScriptContext is stored on server side: you can write function and then call from subsequent commands
- Embeddedable into your wicket pages
- Available throught Wicket DebugBar panel
- Dependency to wicket-devutils is optional
- Pluggable architecture for script engines: you can write your own!
To use wicket console library in your code add following into your pom.xml
<dependency>
<groupId>ru.ydn.wicket.wicket-console</groupId>
<artifactId>wicket-console</artifactId>
<version>1.x</version>
</dependency>
Then you should either enable Wicket DebugBar in your code.
public class MyPage extends WebPage {
public MyPage(final PageParameters parameters) {
super(parameters);
...
add(new DebugBar("debugBar"));
}
}
or you can add WicketConsolePanel on a required page
public class MyPage extends WebPage {
public MyPage(final PageParameters parameters) {
super(parameters);
...
add(new WicketConsolePanel("console"));
}
}
Build project:
cd wicket-console
mvn clean install
Run demo:
cd wicket-console-demo
mvn jetty:run
Then goto http://localhost:8080/
Print all properties of application
for(var p in org.apache.wicket.Application.get())
{
println(p);
}
Math calculation
1+Math.sin(1)*2
Multiply last results by 2
$result*2