[ https://issues.apache.org/jira/browse/WICKET-1726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Johan Compagner closed WICKET-1726. ----------------------------------- Resolution: Invalid We already have RedirectToUrlException and RestartResponseException > utility class: RedirectException > -------------------------------- > > Key: WICKET-1726 > URL: https://issues.apache.org/jira/browse/WICKET-1726 > Project: Wicket > Issue Type: Improvement > Components: wicket > Reporter: Peter Ertl > Attachments: WICKET-1726-1.3.x.patch, WICKET-1726-1.4.x.patch > > > I think it's quite common for wicket applications to redirect to other pages > or external urls. So I think many people would like RedirectException (and > get rid of some boilerplate code). > if(some_condition) > { > getRequestCycle().setRedirect(true); > throw new RestartResponseException(OtherPage.class); > } > could be simplified to > if(some_condition) > throw new RedirectException(OtherPage.class); > The patch also includes: > RestartResponseException(Class<? extends Page> pageClass, PageParameters > params); > RestartResponseException(Page page); > RestartResponseException(String url); > Also I think this makes redirecting not only more compact but also easier to > understand for newbies. They usually don't know about request cycles and > stuff when they start playing with wicket. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.