You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "James Carman (JIRA)" <ji...@apache.org> on 2010/12/16 21:47:01 UTC

[jira] Created: (WICKET-3256) Use a Provider for IExceptionMapper

Use a Provider for IExceptionMapper
-----------------------------------

                 Key: WICKET-3256
                 URL: https://issues.apache.org/jira/browse/WICKET-3256
             Project: Wicket
          Issue Type: New Feature
          Components: wicket
    Affects Versions: 1.5-M3
            Reporter: James Carman


Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos reopened WICKET-3256:
----------------------------------

      Assignee:     (was: Pedro Santos)

Sorry James, I realize now that u can't reopen the ticket if it is closed. My mistake, what I mean is to mark the ticket as closed and see your reason to reopen.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972319#action_12972319 ] 

James Carman commented on WICKET-3256:
--------------------------------------

I don't want my users to have to substitute anything.  I will take care of that for them.  I'm providing a simplification API on top of Wicket.  The only thing I want my users to have to do to plug in my framework is this (in the application's init method):

new WicketopiaPlugin().install(this);

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3256:
---------------------------------------

    Assignee: Martin Grigorov

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3256:
---------------------------------------

    Assignee: Pedro Santos  (was: Martin Grigorov)

The last patch looks very good.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256-test-2.patch, WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos closed WICKET-3256.
--------------------------------

    Resolution: Won't Fix

Martin is right:

app.setRequestCycleProvider(new IRequestCycleProvider()
		{
			public RequestCycle get(RequestCycleContext context)
			{
				RequestCycle requestCycle = new RequestCycle(context);
				requestCycle.getListeners().add(new IRequestCycleListener()
				{
					public IRequestHandler onException(RequestCycle cycle, Exception ex)
					{
--> custom handler
						return null;
					}
					
					public void onEndRequest(RequestCycle cycle)
					{
					}
					
					public void onDetach(RequestCycle cycle)
					{
					}
					
					public void onBeginRequest(RequestCycle cycle)
					{
					}
				});
				return null;
			}
		});

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman updated WICKET-3256:
---------------------------------

    Attachment: WICKET-3256.patch

Here's a patch that provides an implementation of what I have in mind.  It introduces a field of type IProvider<IExceptionMapper> rather than creating a new interface called IExceptionMapperProvider (doesn't add value IMHO).  I didn't add a test case, but the build finishes successfully and all test cases pass.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972478#action_12972478 ] 

Pedro Santos commented on WICKET-3256:
--------------------------------------

ok, I will keep working on the test case

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972480#action_12972480 ] 

James Carman commented on WICKET-3256:
--------------------------------------

I can do it.  I just need to find a few cycles.  My morning is shot today (I'm on EDT), but I can probably address it this afternoon.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972473#action_12972473 ] 

James Carman commented on WICKET-3256:
--------------------------------------

I meant more in line with the way other stuff is set up on the Application.  All of the other setBlahBlahProvider stuff.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972437#action_12972437 ] 

Martin Grigorov commented on WICKET-3256:
-----------------------------------------

James, what you need is currently supported by org.apache.wicket.request.cycle.IRequestCycleListener.onException(RequestCycle, Exception).
You can add a custom listener that will return custom IRequestHandler depending on the Exception type.

The ExceptionMapper is used only if none of the registered listeners returns a non-null response for its onException() method.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman updated WICKET-3256:
---------------------------------

    Attachment:     (was: WICKET-3256.patch)

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos resolved WICKET-3256.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M4

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>             Fix For: 1.5-M4
>
>         Attachments: WICKET-3256-test-2.patch, WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos reassigned WICKET-3256:
------------------------------------

    Assignee: Pedro Santos

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972220#action_12972220 ] 

Pedro Santos commented on WICKET-3256:
--------------------------------------

Hi James, in you patch user still needs to implement an method - IProvider.get() - rather then just call an setter method. On what point user would invoke the setExceptionMapperProvider method other than the application subclass (point where would make sense maintain the newExceptionMapper)?

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972463#action_12972463 ] 

James Carman commented on WICKET-3256:
--------------------------------------

It's usually good to let the original reporter close their own JIRA issues.  The development team should resolve it, but the reporter should close it themselves (unless they completely disappear, which I did not).

Yes, this can be done with the IRequestCycleListener, but the way I set it up does make it fall more in line with how the other stuff works (the "providery" way).

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972314#action_12972314 ] 

Pedro Santos commented on WICKET-3256:
--------------------------------------

Hi James, I was creating an test case for your patch simulating your use case, but the test case was failing. Investigating the reason, I figure out that your framework user can provide his own IRequestCycleProvider setting a custom exception mapper on context ignoring your wrapper. An example: BaseWicketTester.TestRequestCycleProvider
Can you send a different patch enabling your use case?

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Carman updated WICKET-3256:
---------------------------------

    Attachment: WICKET-3256.patch

Oops!  Left my renamed method in there.  This patch deletes it.  Use this one, please.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972488#action_12972488 ] 

James Carman commented on WICKET-3256:
--------------------------------------

I added a RequestCycleListener to the application in the test case and it wasn't notified either of the exception. 

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3256:
---------------------------------

    Attachment: WICKET-3256-test-2.patch

test to wrapper exception mapper providers

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3256-test-2.patch, WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972471#action_12972471 ] 

Pedro Santos commented on WICKET-3256:
--------------------------------------

By more in line you mean the BaseWicketTester.TestRequestCycleProvider way to wrap the IRequestMapper using the BaseWicketTester.TestExceptionMapper?

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972492#action_12972492 ] 

Pedro Santos commented on WICKET-3256:
--------------------------------------

The problem is that Wicket tester is creating an context to the request cycle to early: before we set the custom providers.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pedro Santos updated WICKET-3256:
---------------------------------

    Attachment: WICKET-3256-test.patch

Hi James, sending an faling test case showing an wrapper exception mapper being ignored.

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>            Assignee: Pedro Santos
>         Attachments: WICKET-3256-test.patch, WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3256) Use a Provider for IExceptionMapper

Posted by "James Carman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972224#action_12972224 ] 

James Carman commented on WICKET-3256:
--------------------------------------

Pedro,

In my "framework", I've got some initialization code where I'm basically going to wrap around the default IProvider<IExceptionMapper> with my own.  I've got a situation where I want to be able to register "handlers" for specific exception types (in a security situation).  So, if I have a registered handler, I want to use that.  If not, I'll be just letting the request flow through to the default exception mapper.  Again, my "framework" does this automatically.  User code can call:

addExceptionHandler(MyExceptionType.class, new MyHandler());

Thanks,

James

> Use a Provider for IExceptionMapper
> -----------------------------------
>
>                 Key: WICKET-3256
>                 URL: https://issues.apache.org/jira/browse/WICKET-3256
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.5-M3
>            Reporter: James Carman
>         Attachments: WICKET-3256.patch
>
>
> Currently, in order to plug in your own IExceptionMapper, you have to override a method.  This makes developing "frameworks" difficult, since your client code has to do a method override in order to get everything working.  It would be nicer if the IExceptionManager was created via a "provider."

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.