Hi, I migrated my application from wicket 1.4.21 to 6.8.0.

In the onSubmit method of a SubmitLink, if errors are present in the
submitted values, I want to display the same page with the specified errors.

In wicket 1.4, I was doing this :

        public void handleErrors() {
                if (!this.errors.isEmpty()) {
                        // Pass the errors to the resulting page
                        final PageParameters params = new PageParameters();
                        params.put("errors", this.errors);

                        // Do not redirect!
                        getRequestCycle().setRedirect(false);

                        // Same page is shown with validation errors
                        setResponsePage(getClass(), params);
                }
        }

The "errors" were passed to the response in post parameters.

Now, with wicket 6.8.0 (think this appears since wicket 5...), the only
difference in my code is that the method
getRequestCycle().setRedirect(false)   disappear.

Now, all my errors are sent in the URL because of the redirect after the
post. 

Is there a way that I can turn off the redirection only if errors are
present ?
I don't want to see all my errors in the URL.

Thanks
David






--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-submit-without-redirection-tp4659496.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to