Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.3, 1.4-M1
    • Fix Version/s: 1.3.4, 1.4-M2
    • Component/s: wicket
    • Labels:
      None

      Description

      We have exceptions that restart a response and go to a different page, or to an intercept page. But we can't redirect to an external site.

      public class RedirectToExternalException extends AbstractRestartResponseException
      {
      private static final long serialVersionUID = 1L;

      public RedirectToExternalException(String url)
      {
      RequestCycle rc = RequestCycle.get();
      if (rc == null)

      { throw new IllegalStateException( "This exception can only be thrown from within request processing cycle"); }

      else
      {
      Response r = rc.getResponse();
      if (!(r instanceof WebResponse))

      { throw new IllegalStateException( "This exception can only be thrown when wicket is processing an http request"); }

      // abort any further response processing
      rc.setRequestTarget(new RedirectRequestTarget(url));
      }
      }
      }

        Attachments

          Activity

            People

            • Assignee:
              jcompagner Johan Compagner
              Reporter:
              dashorst Martijn Dashorst
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified