jwcarman wrote:
>
> How about something like:
>
> public class DefaultFocusBehavior extends AbstractBehavior
> {
> private Component component;
>
> public void bind( Component component )
> {
> this.component = component;
> component.setOutputMarkupId(true);
> }
>
> public void renderHead( IHeaderResponse iHeaderResponse )
> {
> super.renderHead(iHeaderResponse);
> iHeaderResponse.renderOnLoadJavascript("document.getElementById('"
> + component.getMarkupId() + "').focus();");
> }
> }
>
This simply looks great ! I think this should make it into the core Wicket
behaviors as the componenet focus is quite useful.
Cheers.
--
View this message in context:
http://www.nabble.com/Default-Focus-Behavior--tp15934889p15945036.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]