you can call AjaxRequestTarget#focusComponent(Component).
either you pass the AjaxRequestTarget to the replacing panel and let it set
the focus itself or you can have a method which returns the component that
should get the focus.

gerolf

On 8/29/07, Francisco Diaz Trepat - gmail <[EMAIL PROTECTED]>
wrote:
>
> Hi, I am changing a panel inside a page with an ajax link, I
> change them from one to another panels A B C D etc.
> Inside each of the panels there is a field (textfield, choicefield, etc,
> depending on which panel) that must have the focus when loaded.
>
> I previously built a behavior that can be added to any component that
> needs
> the focus.
> That behavior function is called perfectly but before the pos-handlers for
> the ajax call end.
> So what happens is that the ajax functions are putting the focus on the
> component that had it before the call started, in this case the ajax link.
>
> And what is happening due to that call is that my component gets the
> focus,
> but immediately after gets blur or the focus is taken away from the field
> and back to the link.
>
>
> Is there another way? or a form to avoid refocusing of components in ajax
> calls?
>
>
> f(t)
>

Reply via email to