I was actually trying something close with overriding
renderHead(IHeaderResponse iHeaderResponse). Didn't seem to stick
though...

Just for the record - would the above method be an alternative to making
this work?

Thanks a bunch - saved my day.

Cheers,

Michael

-----Original Message-----
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 3:56 PM
To: users@wicket.apache.org
Subject: Re: How to set focus to a textfield inside AJAX

textfield.setoutputmarkupid(true);
radio.add(new behavior() { oncomponenttag(tag) { tag.put("onclick",
"getelementbyid('"+textfield.getmarkupid()+"').focus()";}));

-igor


On Thu, Mar 20, 2008 at 3:51 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> Well, it doesn't necessarily have to happen in there. What I need to
do
>  is to bind a Radio component to a TextField component. When the Radio
>  gets clicked I want the focus in it's TextField to be set.
>
>  Any ideas?
>
>  Michael
>
>
>
>  -----Original Message-----
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  Sent: Thursday, March 20, 2008 3:28 PM
>  To: users@wicket.apache.org
>  Subject: Re: How to set focus to a textfield inside AJAX
>
>  why cant you do this with javascript without ajax?? seems like a huge
>  waste to have a server callback just to set focus
>
>  -igor
>
>  On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle
<[EMAIL PROTECTED]>
>  wrote:
>  > I have a WMC that I added an AjaxEventBehavior(onclick) to. Inside
I
>  >  want to set the focus to a particular textfield - how would I do
>  that?
>  >
>  >  I have seen some techniques on how to do this on page load, but
this
>  is
>  >  AJAX so I need something dynamic.
>  >
>  >  Anyone solved this problem before?
>  >
>  >  Michael
>  >
>  >
---------------------------------------------------------------------
>  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to