First of all I want to mention that I am a beginner when it comes to js and wicket.
I am trying to retrieve a variable that is defined in javascript on my page. I want to retrieve this variable when an event is triggered on my page.
I use this code to retrieve the variable but it is not working (this is my wicket panel java class):
...
add(new AjaxEventBehavior("onclick") {
private static final long serialVersionUID = 1L;
protected void onEvent(AjaxRequestTarget target) {
if(target != null) {
String value = RequestCycle.get().getRequest().getParameter("i");
}
}
});
Could someone point me in the right direction?
Thank you in advance.