You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Erki Erki <er...@gmail.com> on 2011/07/28 08:26:05 UTC

AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

Hello,

I have this problem with wicket.
I have added onBlur AjaxFormComponentUpdatingBehavior to my textfield.

After the user moves focus to something else, the style of the
right/previous component is updated correctly, but the focus is taken away
from the other/nonupdated selected component.

I have added an eclipse project to display this behaviour. Just move the
focus between textfields.

Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

Posted by Jack Berg <er...@gmail.com>.
It seems, that cause was, that I was adding all the components to the
AjaxRequestTarget in my AjaxRequestTarget.IListener. Is it a bug, that it
does not return focus to the replaced component?

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-target-addComponent-component-causes-to-lose-focus-tp3700530p3703624.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

Posted by Jack Berg <er...@gmail.com>.
Sorry, I should have been more clear. AjaxFeedbackUpdater is a class in my
sample project that "implements AjaxRequestTarget.IListener" . In its
onBeforeRespond method, I add components to the AjaxRequestTarget. I tried
adding "focusComponent(null)", but no luck.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-target-addComponent-component-causes-to-lose-focus-tp3700530p3701266.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

Posted by Martin Grigorov <mg...@apache.org>.
There is no class AjaxFeedbackUpdater in Wicket distro.
I'm talking about AjaxRequestTarget.focusComponent() method.

On Thu, Jul 28, 2011 at 2:36 PM, Jack Berg <er...@gmail.com> wrote:
> You are talking about the AjaxFeedbackUpdater.onBeforeRespond method?
> It didn't work for me. It behaves the same.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-target-addComponent-component-causes-to-lose-focus-tp3700530p3701092.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

Posted by Jack Berg <er...@gmail.com>.
You are talking about the AjaxFeedbackUpdater.onBeforeRespond method?
It didn't work for me. It behaves the same. 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-target-addComponent-component-causes-to-lose-focus-tp3700530p3701092.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxFormComponentUpdatingBehavior target.addComponent(component) causes to lose focus

Posted by Martin Grigorov <mg...@apache.org>.
add target.focusComponent(null)
This way Wicket wont try to restore the focus

On Thu, Jul 28, 2011 at 9:26 AM, Erki Erki <er...@gmail.com> wrote:
> Hello,
>
> I have this problem with wicket.
> I have added onBlur AjaxFormComponentUpdatingBehavior to my textfield.
>
> After the user moves focus to something else, the style of the
> right/previous component is updated correctly, but the focus is taken away
> from the other/nonupdated selected component.
>
> I have added an eclipse project to display this behaviour. Just move the
> focus between textfields.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org