@Override
public void renderHead(Component component, IHeaderResponse response) {
super.renderHead(component, response);
OnLoadHeaderItem headerItem = OnLoadHeaderItem.forScript("Wicket.Event.add('" + component.getMarkupId() + "', '" + event + "', function(event) {\n" +
"websocket" + component.getMarkupId() + ".send('" + event + "');}\n);");
response.render(headerItem);
}