[ 
https://issues.apache.org/jira/browse/WICKET-6158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov updated WICKET-6158:
------------------------------------
    Priority: Minor  (was: Major)

> 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
>            Priority: Minor
>
> 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)

Reply via email to