Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2746

Implementing fix in WICKET-1292

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.5
    • 1.5.0
    • wicket
    • All

    Description

      I have been trying to implement the workaround you mention in this ticket. I have not been successful. I am not clear where the following code (from the comment in WICKET-1292) would go in the test case java files included in WICKET - 1292?

      from ticket:

      Workaround by Maurice Marrink:

      // continueToOriginaldestination does not work if there is no url available, so we need to fake one here(testing only hack)

      mock.setupRequestAndResponse();
      WebRequestCycle cycle = mock.createRequestCycle();
      String url1 = cycle.urlFor(new BookmarkablePageRequestTarget(YOUR_PAGE_HERE.class, null)).toString();

      mock.getServletRequest().setURL("/GeneralTest$1/GeneralTest$1/" + url1);
      mock.processRequestCycle();


      mock is the WicketTester.
      GeneralTest$1 from the url is the classname of your application without the package. (in my case it is an anonymous inner class hence the $1) Note that this classname appears twice in the url.

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            rfball Roger Ball
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: