You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2016/05/03 17:08:12 UTC

[jira] [Commented] (WICKET-6158) Provide error message for Ajax requests in DefaultExceptionMapper

    [ https://issues.apache.org/jira/browse/WICKET-6158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15268849#comment-15268849 ] 

Martin Grigorov commented on WICKET-6158:
-----------------------------------------

Discussion at users@: http://markmail.org/message/klzu4hfajeqruzdp

> Provide error message for Ajax requests in DefaultExceptionMapper
> -----------------------------------------------------------------
>
>                 Key: WICKET-6158
>                 URL: https://issues.apache.org/jira/browse/WICKET-6158
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 7.3.0
>            Reporter: Thorsten Schöning
>
> DefaultExceptionMapper.internalMap recognizes if something is an Ajax request or not and depending on the current application settings a special error handler is returned in case of Ajax. I would like to keep that approach, but additionally optionally forward at least some part of the currently available exception message with that given handler. The handler in general is capable of managing an arbitrary message, that's already used in ServletWebRequest.getClientUrl. The problem with the current approach is that's it's not easily overridable, because internalMap is private and such.
> So I would like to suggest that you either introduce an additional AjaxErrorHandlingStrategy like INVOKE_FAILURE_HANDLER_WITH_MSG and provide the exception message in that case to the handler or add a protected callback which gets the current exception and returns the handler to return in case of Ajax. Both approaches make sense to me and would help me a lot in my use case, but I guess the protected callback is more flexible in general.
> Thanks for consideration!
> There's a discussion on the mailing list as well:
> http://mail-archives.apache.org/mod_mbox/wicket-users/201605.mbox/<1798138067.20160503142201%40am-soft.de>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)