Package org.apache.wicket.protocol.http

Examples of org.apache.wicket.protocol.http.WebRequestCycle.urlFor()


    // continueto originaldestination 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(SecureComponentPage.class, null))
        .toString();
    // the expected url is the base test
    mock.getServletRequest().setURL("/WaspAbstractTestBase$1/WaspAbstractTestBase$1/" + url1);
    mock.processRequestCycle();
    mock.assertRenderedPage(getLoginPage());
View Full Code Here


    // continueto originaldestination 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(SecureComponentPage.class, null))
        .toString();
    mock.getServletRequest().setURL("/WaspAbstractTestBase$1/WaspAbstractTestBase$1/" + url1);
    mock.processRequestCycle();
    mock.assertRenderedPage(getLoginPage());
    FormTester form = mock.newFormTester("signInPanel:signInForm");
View Full Code Here

    // continueto originaldestination 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(SecureLinkPage.class, null)).toString();
    mock.getServletRequest().setURL("/WaspAbstractTestBase$1/WaspAbstractTestBase$1/" + url1);
    mock.processRequestCycle();
    mock.assertRenderedPage(getLoginPage());
    FormTester form = mock.newFormTester("signInPanel:signInForm");
    form.setValue("username", "test");
View Full Code Here

        {
          IBookmarkablePageRequestTarget current = (IBookmarkablePageRequestTarget)target;
          BookmarkablePageRequestTarget redirect = new BookmarkablePageRequestTarget(
            session.createAutoPageMapName(), current.getPageClass(), current
              .getPageParameters());
          url = cycle.urlFor(redirect);
        }
        else
        {
          url = webPage.urlFor(INewBrowserWindowListener.INTERFACE);
        }
View Full Code Here

        {
          IBookmarkablePageRequestTarget current = (IBookmarkablePageRequestTarget)target;
          BookmarkablePageRequestTarget redirect = new BookmarkablePageRequestTarget(
              session.createAutoPageMapName(), current.getPageClass(), current
                  .getPageParameters());
          url = cycle.urlFor(redirect);
        }
        else
        {
          url = webPage.urlFor(INewBrowserWindowListener.INTERFACE);
        }
View Full Code Here

        {
          IBookmarkablePageRequestTarget current = (IBookmarkablePageRequestTarget)target;
          BookmarkablePageRequestTarget redirect = new BookmarkablePageRequestTarget(
            session.createAutoPageMapName(), current.getPageClass(),
            current.getPageParameters());
          url = cycle.urlFor(redirect);
        }
        else
        {
          url = webPage.urlFor(INewBrowserWindowListener.INTERFACE);
        }
View Full Code Here

        {
          IBookmarkablePageRequestTarget current = (IBookmarkablePageRequestTarget)target;
          BookmarkablePageRequestTarget redirect = new BookmarkablePageRequestTarget(
              session.createAutoPageMapName(), current.getPageClass(), current
                  .getPageParameters());
          url = cycle.urlFor(redirect);
        }
        else
        {
          url = webPage.urlFor(INewBrowserWindowListener.INTERFACE);
        }
View Full Code Here

  {
    tester.setupRequestAndResponse();
    WebRequestCycle cycle = tester.createRequestCycle();
   
    ResourceReference rr = new ResourceReference("test");
    CharSequence url = cycle.urlFor(rr);
    assertEquals("resources/org.apache.wicket.Application/test", url);

    rr = new ResourceReference(SharedResourceUrlTest.class,"test");
    url = cycle.urlFor(rr);
    assertEquals("resources/org.apache.wicket.SharedResourceUrlTest/test", url);
View Full Code Here

    ResourceReference rr = new ResourceReference("test");
    CharSequence url = cycle.urlFor(rr);
    assertEquals("resources/org.apache.wicket.Application/test", url);

    rr = new ResourceReference(SharedResourceUrlTest.class,"test");
    url = cycle.urlFor(rr);
    assertEquals("resources/org.apache.wicket.SharedResourceUrlTest/test", url);
}
 
  /**
   * @throws Exception
View Full Code Here

  {
    tester.setupRequestAndResponse();
    WebRequestCycle cycle = tester.createRequestCycle();
   
    ResourceReference rr = new ResourceReference("test");
    CharSequence url = cycle.urlFor(rr,new ValueMap("param=value",""));
    assertEquals("resources/org.apache.wicket.Application/test?param=value", url);

    rr = new ResourceReference(SharedResourceUrlTest.class,"test");
    url = cycle.urlFor(rr,new ValueMap("param=value",""));
    assertEquals("resources/org.apache.wicket.SharedResourceUrlTest/test?param=value", url);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.