diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java index 48af754e9da..a3099c74556 100644 --- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java +++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/FilterForm.java @@ -22,6 +22,7 @@ import org.apache.wicket.markup.MarkupStream; import org.apache.wicket.markup.head.IHeaderResponse; import org.apache.wicket.markup.head.JavaScriptHeaderItem; +import org.apache.wicket.markup.head.OnEventHeaderItem; import org.apache.wicket.markup.head.OnLoadHeaderItem; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.FormComponent; @@ -140,11 +141,9 @@ public void bind(Component component) } @Override - public void onComponentTag(final Component component, final ComponentTag tag) - { - tag.put("onfocus", getFocusTrackingHandler(component)); - - super.onComponentTag(component, tag); + public void renderHead(Component component, IHeaderResponse response) { + response.render(OnEventHeaderItem.forComponent(component, "focus", + getFocusTrackingHandler(component))); } }); }