You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alex Grant <al...@unimarket.com> on 2012/06/25 01:34:13 UTC

Suppress Ajax ComponentNotFoundException

I have a problem that shows up intermittently (and never when I try to reproduce it). 

We have ModalWindows that contain fields with associated AjaxFormComponentUpdatingBehaviors on the onblur event. These work great while the ModalWindow is open but sometimes events are received out of sequence and we get an update event firing after ModalWindow is closed. Wicket the throws a ComponentNotFoundException and the users sees the error page. 

Is there some way I can prevent these happening, or at least suppress them? All the field values will have been submitted when the ModalWindow was closed so the extra update event can be safely ignored. 

Thanks

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


Re: Suppress Ajax ComponentNotFoundException

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

This can happen if you change the component tree in Ajax request but forget
to update the client (i.e. forget to add some components to
AjaxRequestTarget). Later if you click on  such stale component that has
Ajax behavior it wont be able to find itself at the server.


On Thu, Mar 21, 2013 at 10:45 PM, jchappelle <jc...@4redi.com> wrote:

> Did anyone ever find a solution to this? We are having the same problem
> with
> ComponentNotFoundExceptions.
>
> Thanks,
>
> Josh
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Suppress-Ajax-ComponentNotFoundException-tp4650209p4657428.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 <http://jweekend.com/>

RE: Suppress Ajax ComponentNotFoundException

Posted by jchappelle <jc...@4redi.com>.
Did anyone ever find a solution to this? We are having the same problem with
ComponentNotFoundExceptions. 

Thanks,

Josh



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Suppress-Ajax-ComponentNotFoundException-tp4650209p4657428.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: Suppress Ajax ComponentNotFoundException

Posted by Alex Grant <al...@unimarket.com>.
Thank you.
I don't think either of those will work (though I will try them) as

* The update event is (I assume - but don't know as I can't reproduce the problem myself) being generated in the browser before the modal window is closed.
* The canCallListenerInterface method is invoked after the component has been found - so it's already too late.

Alex

-----Original Message-----
From: W Mazur [mailto:wlodekmazur@gmail.com] 
Sent: Monday, 25 June 2012 8:48 p.m.
To: users@wicket.apache.org
Subject: Re: Suppress Ajax ComponentNotFoundException

I would  try to add WindowClosedCallback to Modal Window and remove
behavior(s) in that callback (unless you are going to reuse that ModalWindow).

Another option: try to override Behavior's canCallListenerInterface()

Regards
Wlodek

2012/6/25 Alex Grant <al...@unimarket.com>:
> I have a problem that shows up intermittently (and never when I try to reproduce it).
>
> We have ModalWindows that contain fields with associated AjaxFormComponentUpdatingBehaviors on the onblur event. These work great while the ModalWindow is open but sometimes events are received out of sequence and we get an update event firing after ModalWindow is closed. Wicket the throws a ComponentNotFoundException and the users sees the error page.
>
> Is there some way I can prevent these happening, or at least suppress them? All the field values will have been submitted when the ModalWindow was closed so the extra update event can be safely ignored.
>
> Thanks
>
> Alex Grant.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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


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


Re: Suppress Ajax ComponentNotFoundException

Posted by W Mazur <wl...@gmail.com>.
I would  try to add WindowClosedCallback to Modal Window and remove
behavior(s) in that callback (unless you are going to reuse that
ModalWindow).

Another option: try to override Behavior's canCallListenerInterface()

Regards
Wlodek

2012/6/25 Alex Grant <al...@unimarket.com>:
> I have a problem that shows up intermittently (and never when I try to reproduce it).
>
> We have ModalWindows that contain fields with associated AjaxFormComponentUpdatingBehaviors on the onblur event. These work great while the ModalWindow is open but sometimes events are received out of sequence and we get an update event firing after ModalWindow is closed. Wicket the throws a ComponentNotFoundException and the users sees the error page.
>
> Is there some way I can prevent these happening, or at least suppress them? All the field values will have been submitted when the ModalWindow was closed so the extra update event can be safely ignored.
>
> Thanks
>
> Alex Grant.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

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