You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rakesh A <ia...@rediffmail.com> on 2016/01/06 10:39:01 UTC

Exception handling in AutoCompleteTextField

Hi,

If we get an exception while preparing suggestions/choices for the entered
text (in AutoCompleteTextField#getChoices()), I see that, there is no means
to show it to user.
JavaScript implementation handles only success responses.

Is there any way to execute standard Ajax response handling, in this case?

Please find attached quick start, try entering 'test' in the autocomplete
text field on home page.

autocomplete.7z
<http://apache-wicket.1842946.n4.nabble.com/file/n4673192/autocomplete.7z>  

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192.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: Exception handling in AutoCompleteTextField

Posted by Rakesh A <ia...@rediffmail.com>.
Hi,

After looking into ajax code a bit, I see that 'Ajax-Location' header is not
considered for autocomplete response.
I created a PR (https://github.com/apache/wicket/pull/156) with a small
change to ajax JavaScript.

Regards,
Rakesh.A

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192p4673272.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: Exception handling in AutoCompleteTextField

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

The error handling in Ajax is controlled
via org.apache.wicket.settings.ExceptionSettings#setAjaxErrorHandlingStrategy().
By default it redirects to the error page.
http://examples7x.wicket.apache.org/ajax/links shows both ways.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Jan 6, 2016 at 10:39 AM, Rakesh A <ia...@rediffmail.com>
wrote:

> Hi,
>
> If we get an exception while preparing suggestions/choices for the entered
> text (in AutoCompleteTextField#getChoices()), I see that, there is no means
> to show it to user.
> JavaScript implementation handles only success responses.
>
> Is there any way to execute standard Ajax response handling, in this case?
>
> Please find attached quick start, try entering 'test' in the autocomplete
> text field on home page.
>
> autocomplete.7z
> <http://apache-wicket.1842946.n4.nabble.com/file/n4673192/autocomplete.7z>
>
> Regards,
> Rakesh.A
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Exception-handling-in-AutoCompleteTextField-tp4673192.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
>
>