You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Andrea Del Bene (JIRA)" <ji...@apache.org> on 2016/04/25 14:32:12 UTC
[jira] [Comment Edited] (WICKET-6075) Error page redirection for
Autocomplete field response
[ https://issues.apache.org/jira/browse/WICKET-6075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15256279#comment-15256279 ]
Andrea Del Bene edited comment on WICKET-6075 at 4/25/16 12:31 PM:
-------------------------------------------------------------------
I've prepared a new patch that does the job without breaking test cases. I've attached it above. The only concern I have is that with my solution the behavior of processAjaxResponse is changed as it doesn't directly handle redirection anymore. This can be an issue if someone used directly this function in her/his code (although this should be unlikely).
was (Author: bitstorm):
I've prepared a new patch that does the job without breaking test cases. I've attached it above. The only concern I have is that with my solution the behavior of processAjaxResponse is changed as it doesn't directly handle redirection anymore. This can be an issue if someone used directly this function in her/his code.
> Error page redirection for Autocomplete field response
> ------------------------------------------------------
>
> Key: WICKET-6075
> URL: https://issues.apache.org/jira/browse/WICKET-6075
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.21.0, 7.1.0
> Reporter: Rakesh A
> Assignee: Andrea Del Bene
> Attachments: WICKET-WICKET-6075.patch, autocomplete.7z
>
>
> If ExceptionSettings#errorHandlingStrategyDuringAjaxRequests,
> is set to ExceptionSettings.AjaxErrorStrategy.REDIRECT_TO_ERROR_PAGE, and AutoCompleteTextField.getChoices(String) results an exception, 'Ajax-Location' header is ignored.
> In wicket-ajax-jquery.js, 'Ajax-Location' header is processed in 'Wicket.Ajax.Call.processAjaxResponse()' method. But for autocomplete field, 'wr' ajax attribute is set to false and below given block (success callback in doAjax() method) in 'wicket-ajax-jquery.js', doesn't go into processAjaxResponse() method.
> success: function(data, textStatus, jqXHR) {
> if (attrs.wr) {
> self.processAjaxResponse(data, textStatus, jqXHR, context);
> } else {
> self._executeHandlers(attrs.sh, attrs, jqXHR, data, textStatus);
> we.publish(topic.AJAX_CALL_SUCCESS, attrs, jqXHR, data, textStatus);
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)