document onkeypress onkeydown

2010-02-04 Thread Gatos
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

2010-02-04 Thread Stefan Fussenegger
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); }