document onkeypress onkeydown
Hello, How is it possible to add event behavior for the document? I tried this one, but it didn't work: add(new AjaxEventBehavior(onkeypress){ @Override protected void onEvent(final AjaxRequestTarget target) { LOG.debug(keypress); } });
Re: document onkeypress onkeydown
Add a WebMarkupContainer to body, i.e. body wicket:id=body.../body add(new WebMarkupContainer(body) .add(new AjaxEventBehavior(onkeypress){ protected void onEvent(final AjaxRequestTarget target) { LOG.debug(keypress); }