RE: Exception handling wicket 8

2019-02-18 Thread HOPPAN Matúš
Thanks for fast response, ive created quickstart and attached it to JIRA issue https://issues.apache.org/jira/browse/WICKET-6637 Matus -Original Message- From: Martin Grigorov Sent: Monday, February 18, 2019 1:49 PM To: users@wicket.apache.org Subject: Re: Exception handling wicket 8

Re: Exception handling wicket 8

2019-02-18 Thread Martin Grigorov
Hi, Sounds like a bug in Wicket. If you can reproduce it in a quickstart (mini) application then please attach it to a ticket in JIRA! Thanks! On Mon, Feb 18, 2019 at 2:45 PM HOPPAN Matúš wrote: > Hi, > > recently we have upgraded our application, from wicket 7.11 to wicket > 8.3.0. > With

Re: Exception Handling (ajax)

2016-03-09 Thread Sven Meier
Yes, indeed. Sven On 09.03.2016 15:43, Lars Törner wrote: Hi Sven and thanks for your answer! Ok I see! That's a better solution. I guess it means that I don't have to set: getExceptionSettings().setAjaxErrorHandlingStrategy( AjaxErrorStrategy.INVOKE_FAILURE_HANDLER); Because we'll never get

Re: Exception Handling (ajax)

2016-03-09 Thread Lars Törner
Hi Sven and thanks for your answer! Ok I see! That's a better solution. I guess it means that I don't have to set: getExceptionSettings().setAjaxErrorHandlingStrategy( AjaxErrorStrategy.INVOKE_FAILURE_HANDLER); Because we'll never get to the DefaultExceptionMapper (in the case of an expected

Re: Exception Handling (ajax)

2016-03-09 Thread Sven Meier
Hi Lars, > if this is a good or bad way to handle exceptions during ajax requests I'd keep your IRequestCycleListener and just return new ErrorCodeRequestHandler(500, message) from there. No need to fiddle with IExceptionMapper and/or DefaultExceptionMapper. Have fun Sven On 09.03.2016

Re: Exception handling in AutoCompleteTextField

2016-01-12 Thread Rakesh A
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:

Re: Exception handling in AutoCompleteTextField

2016-01-08 Thread Martin Grigorov
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

Re: Exception handling and testing

2012-09-27 Thread Martin Grigorov
Make the TabbedPanel stateless by using BookmarkablePageLink. P.S. Please start a new thread when you have new questions. On Wed, Sep 26, 2012 at 10:56 PM, Alec Swan alecs...@gmail.com wrote: Thanks, that worked as advertised. Now I am wondering if it's possible to get this to work when the

Re: Exception handling and testing

2012-09-27 Thread Alec Swan
Thanks, works great. I just needed to convert IRequestParameters to PageParameters in RequestHandler#onException() in order to remember the tab selection made by the user throughout login. Is there a convenience method somewhere in wicket to convert between IRequestParameters and PageParameters?

Re: Exception handling and testing

2012-09-26 Thread Martin Grigorov
You have to return a IRequestHandler. See RenderPageRequestHandler On Wed, Sep 26, 2012 at 1:45 AM, Alec Swan alecs...@gmail.com wrote: I am trying to implement Martin's @SubSite annotation approach to redirect the user to the sub-site's home page when AuthenticationException is thrown in

Re: Exception handling and testing

2012-09-26 Thread Alec Swan
Thanks, that worked as advertised. Now I am wondering if it's possible to get this to work when the user click on a tab in TabbedPanel? RenderPageRequestHandler(new PageProvider(HomePage.class), ALWAYS_REDIRECT) seems to lose the knowledge of the tab selected by the user and redirects the user to

Re: Exception handling and testing

2012-09-25 Thread Alec Swan
I am trying to implement Martin's @SubSite annotation approach to redirect the user to the sub-site's home page when AuthenticationException is thrown in Wicket 1.5. However, apparently I cannot throw a RestartResponseAtInterceptPageException(annotation.homePage()) from

Re: exception handling (get cause page)

2012-09-04 Thread Alfonso Quiroga
It works perfectly thanks On Mon, Sep 3, 2012 at 3:11 PM, Martin Grigorov mgrigo...@apache.org wrote: Hi, See https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java Register it, then use it:

Re: exception handling (get cause page)

2012-09-03 Thread Martin Grigorov
Hi, See https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/request/cycle/PageRequestHandlerTracker.java Register it, then use it: PageRequestHandlerTracker.getLastHandler(cycle).getPage() On Mon, Sep 3, 2012 at 8:00 PM, Alfonso Quiroga

Re: Exception handling and testing

2012-06-08 Thread Alec Swan
That's clever. I will give it a try. What is the recommendation on verifying that an exception was thrown during page rendering using Wicket tester? I am not talking just about authentication here, but exceptions in general. Thanks, Alec On Thu, Jun 7, 2012 at 6:18 PM, Martin Grigorov

Re: Exception handling and testing

2012-06-08 Thread Michal Margiel
2012/6/8 Alec Swan alecs...@gmail.com That's clever. I will give it a try. What is the recommendation on verifying that an exception was thrown during page rendering using Wicket tester? I am not talking just about authentication here, but exceptions in general. Hello, Why you want to

Re: Exception handling and testing

2012-06-08 Thread Alec Swan
I also use this approach, but with authentication exceptions thrown by Wicket it's hard to tell if the user was redirected to Login page because of authentication or some other exceptions. On Fri, Jun 8, 2012 at 1:15 PM, Michal Margiel michal.marg...@gmail.com wrote: 2012/6/8 Alec Swan

Re: Exception handling and testing

2012-06-07 Thread Martin Grigorov
Hi, You can use IAuthenticationStrategy and throw RestartResponseAtInterceptException. On Wed, Jun 6, 2012 at 8:09 PM, Alec Swan alecs...@gmail.com wrote: Hello, I am creating a new set of pages that are a part of an old project but have a different home page. It's kind of like a sub-site

Re: Exception handling and testing

2012-06-07 Thread Alec Swan
The problem is that I cannot verify this exception in tests. I am basically asking for best practices. Thanks! On Thu, Jun 7, 2012 at 1:30 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, You can use IAuthenticationStrategy and throw RestartResponseAtInterceptException. On Wed, Jun 6,

Re: Exception handling and testing

2012-06-07 Thread Alec Swan
I am also asking how to redirect to sub-site's home page when the user is not authenticated and tries to access on of those sub-site pages. On Thu, Jun 7, 2012 at 3:35 PM, Alec Swan alecs...@gmail.com wrote: The problem is that I cannot verify this exception in tests. I am basically asking for

Re: Exception handling and testing

2012-06-07 Thread Martin Grigorov
On Fri, Jun 8, 2012 at 12:37 AM, Alec Swan alecs...@gmail.com wrote: I am also asking how to redirect to sub-site's home page when the user is not authenticated and tries to access on of those sub-site pages. Use a custom IAuthenticationStrategy that knows which pages are part of this sub-site

Re: Exception Handling in 1.5

2011-11-17 Thread Nelson Segura
Hey, any idea how can I get the page/page class of the page that was being rendered when the exception happened? I was depending on that in 1.4 to determine the type of page I needed to return, for example if I am in the context of a modal window, I was showing a message in the window, and a close

Re: Exception Handling in 1.5

2011-11-17 Thread Igor Vaynberg
hrm. you cant yet. but you can check if you are in an ajax request or not by using webrequest.isajax() so you can implement that particular usecase without the page. -igor On Thu, Nov 17, 2011 at 1:19 PM, Nelson Segura nsegu...@gmail.com wrote: Hey, any idea how can I get the page/page class of

Re: Exception Handling in 1.5

2011-11-16 Thread Nelson Segura
Great. Thanks for your help. On Mon, Nov 14, 2011 at 7:06 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: application.getrequestcyclelisteners().add(new abstractrequestcyclelistener() {  irequsthandler onexception(e) {       Throwable cause = e;       if (cause instanceof

Re: Exception Handling in 1.5

2011-11-14 Thread Igor Vaynberg
application.getrequestcyclelisteners().add(new abstractrequestcyclelistener() { irequsthandler onexception(e) { Throwable cause = e; if (cause instanceof WicketRuntimeException) { cause = cause.getCause(); } if (cause instanceof InvocationTargetException)

Re: Exception handling for components inside a page

2010-10-01 Thread Igor Vaynberg
no, there isnt. exceptions that occur during render time are very hard to recover from. what you can do is place every panel into an iframe. -igor On Fri, Oct 1, 2010 at 7:14 AM, Rui Fernando Hayashi rui.haya...@tecsinapse.com.br wrote: I have a Wicket page which is a dashboard composed of a

Re: EXception handling in Wicket

2010-08-29 Thread Nitnatsnok
arunarapole wrote: Thank you for replay i am very glad you have sent me the sample code thank you so much My problem is i have to handle SQLException and only message to be display in hidden field same webpage do u have any idea regarding this Aruna It depends. Is your

Re: EXception handling in Wicket

2010-08-29 Thread Nitnatsnok
Antoine van Wel wrote: I think you should prevent that SQLException from happening in the first place by validating the form input. Then use a FeedbackPanel to display suitable error messages. Just google for example code with forms, it's basic stuff. Otherwise, create a FeedbackPanel

Re: EXception handling in Wicket

2010-08-28 Thread Antoine van Wel
I think you should prevent that SQLException from happening in the first place by validating the form input. Then use a FeedbackPanel to display suitable error messages. Just google for example code with forms, it's basic stuff. Otherwise, create a FeedbackPanel on your page, put a try .. catch

Re: EXception handling in Wicket

2010-08-27 Thread arunarapole
Thank you for replay i am very glad you have sent me the sample code thank you so much My problem is i have to handle SQLException and only message to be display in hidden field same webpage do u have any idea regarding this Aruna On Thu, Aug 26, 2010 at 10:14 PM, Nitnatsnok [via Apache

Re: EXception handling in Wicket

2010-08-26 Thread Nitnatsnok
Hi, I don't know if it is a proper way but this is how I did it. 1. Extended WebRequestCycle @Override public Page onRuntimeException(Page page, RuntimeException e) { // if error was during application running e.g. when Home page was loaded and if it was an ajax request that

Re: EXception handling in Wicket

2010-08-26 Thread Nitnatsnok
Oh, also I set not to show Error Page on exception in WebApplication: getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_NO_EXCEPTION_PAGE); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/EXception-handling-in-Wicket-tp2340439p2340562.html

Re: Exception handling

2009-11-15 Thread Jeremy Thomerson
In your application: @Override public RequestCycle newRequestCycle(Request request, Response response) { return new WebRequestCycle(this, (WebRequest) request, response) { @Override public Page onRuntimeException(Page page, RuntimeException e) {

Re: Exception handling

2009-11-15 Thread Wojtek
That's exactly what I need. Thanks a lot. Regards, Wojtek Jeremy Thomerson pisze: In your application: @Override public RequestCycle newRequestCycle(Request request, Response response) { return new WebRequestCycle(this, (WebRequest) request, response) { @Override

Re: exception handling for session dependent URLs

2009-02-16 Thread Igor Vaynberg
please create a jira issue. -igor On Mon, Feb 16, 2009 at 6:00 AM, Michael Sparer michael.spa...@gmx.at wrote: I recently came across a link to one of my projects where a user linked to a session dependent URL such as /?wicket:interface=:0::IBehaviorListener:2:3 when clicking on that URL, a

Re: exception handling for session dependent URLs

2009-02-16 Thread Michael Sparer
aye aye captain :-) https://issues.apache.org/jira/browse/WICKET-2107 igor.vaynberg wrote: please create a jira issue. -igor On Mon, Feb 16, 2009 at 6:00 AM, Michael Sparer michael.spa...@gmx.at wrote: I recently came across a link to one of my projects where a user linked to a

Re: exception handling for session dependent URLs

2009-02-16 Thread Igor Vaynberg
i think this might have to wait until 1.5. we definetely cannot change this for 1.3.6 because it will change existing behavior too much. and since 1.4 is already in the RC i would rather not change it there either. since we will be rewriting all url handling in 1.5 anyways it will be a good time