Reputation: 49
How can I add a focus behavior to a feedback component in a panel?
Searching leads to very little information, mostly on setting the default field. I do not want to set a default field, rather I am looking to set focus
Upvotes: 0
Views: 102
Reputation: 17503
You could focus a Component by using AjaxRequestTarget.focusComponent(feedbackPanel)
.
There are two preconditions for this to work:
tabindex
attributeid
attribute (feedbackPanel.setOutputMarkupId(true)
), so that Wicket Ajax can look it up and set the focus on itUpvotes: 0