Hi Josh,

We also had that "ComponentNotFoundException" problem so now and

My experience might be a different than yours but I'll mention it anyway,
you never know!.

From my experience with our clients, when the client has to wait a bit
longer, he/she re-clicks the same ajax link, where that ajax link will repaint
a panel when it's done processing whatever it has to do, causing the
button/link to disappear or entire panel disappear completely. The second
incoming request is then invalid for the current state of the page.

What I've done is override the "updateAjaxAttributes" function in the
AjaxLink/AjaxFallbackLink by the following:
/protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {/
/  super.updateAjaxAttributes(attributes);/
/  attributes.setChannel(new AjaxChannel("blocking",

This makes sure that even though multiple AJAX requests are received,
only the first request is being processed, any following request is dropped.

Since I've applied this, I've seen no more "ComponentNotFoundException".
Atleast not due to double-clicks/impatient clicks.

Rest of the wicketeers: is this bad practice? It's working very well for me


On Saturday, January 04, 2014 07:15:26 PM jchappelle wrote:
> We get a lot of ComponentNotFoundExceptions in production and I have
> been able to reproduce them. I've had discussions on here before about
> and I think what is happening is that the user clicks something to
> the state of the page, say it removes a button. If we don't add the panel
> to the AjaxRequestTarget then the button will still be there on the
> for the user to click. When they click that button wicket throws this
> exception because the server side does not find that button in the
> component hierarchy(or it isn't visible or whatever).
> So my question is how can I detect when an Ajax request happens and
> gets added to the AjaxRequestTarget and log it out? Or is there a better
> to run this down? I'm open to any ideas or strategies for fixing this
> issue.
> Thanks,
> Josh
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Detecting-when-nothing-is-added-> 
> to-AjaxRequestTarget-tp4663469.html Sent from the Users forum mailing
> archive at Nabble.com.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to