Package org.apache.wicket.core.request.handler

Examples of org.apache.wicket.core.request.handler.RenderPageRequestHandler


   *
   * @param interceptPage
   */
  public RestartResponseAtInterceptPageException(Page interceptPage)
  {
    super(new RenderPageRequestHandler(new PageProvider(interceptPage),
      RedirectPolicy.AUTO_REDIRECT));
    InterceptData.set();
  }
View Full Code Here


   * @param parameters
   */
  public RestartResponseAtInterceptPageException(Class<? extends Page> interceptPageClass,
    PageParameters parameters)
  {
    super(new RenderPageRequestHandler(new PageProvider(interceptPageClass, parameters),
      RedirectPolicy.ALWAYS_REDIRECT));
    InterceptData.set();
  }
View Full Code Here

    if (shouldRedirectToPage(requestCycle))
    {
      // the page itself has been added to the request target, we simply issue a redirect
      // back to the page
      IRequestHandler handler = new RenderPageRequestHandler(new PageProvider(page));
      final String url = rc.urlFor(handler).toString();
      response.sendRedirect(url);
      return;
    }
View Full Code Here

    Url url = Url.parse("wicket/page?4");

    IRequestHandler handler = encoder.mapRequest(getRequest(url));
    assertTrue(handler instanceof RenderPageRequestHandler);

    RenderPageRequestHandler h = (RenderPageRequestHandler)handler;
    checkPage(h.getPage(), 4);
  }
View Full Code Here

    Url url = Url.parse("wicket/page/ingore/me?4&a=3&b=3");

    IRequestHandler handler = encoder.mapRequest(getRequest(url));
    assertTrue(handler instanceof RenderPageRequestHandler);

    RenderPageRequestHandler h = (RenderPageRequestHandler)handler;
    checkPage(h.getPage(), 4);
  }
View Full Code Here

  @Test
  public void encode1()
  {
    MockPage page = new MockPage(15);
    IPageProvider provider = new PageProvider(page);
    IRequestHandler handler = new RenderPageRequestHandler(provider);

    Url url = encoder.mapHandler(handler);
    assertEquals("wicket/page?15", url.toString());
  }
View Full Code Here

    page.getPageParameters().set("a", "b");
    page.getPageParameters().set("b", "c");
    page.setCreatedBookmarkable(true);

    IPageProvider provider = new PageProvider(page);
    IRequestHandler handler = new RenderPageRequestHandler(provider);
    Url url = encoder.mapHandler(handler);

    assertEquals("wicket/bookmarkable/" + PAGE_CLASS_NAME + "/i1/i2?15&a=b&b=c", url.toString());
  }
View Full Code Here

    page.getPageParameters().set("b", "c");

    page.setCreatedBookmarkable(false);

    IPageProvider provider = new PageProvider(page);
    IRequestHandler handler = new RenderPageRequestHandler(provider);
    Url url = encoder.mapHandler(handler);

    // never allow bookmarkable render url for page that has not been created by bookmarkable
    // URL
View Full Code Here

    page.setBookmarkable(true);
    page.setCreatedBookmarkable(true);
    page.setPageStateless(true);

    IPageProvider provider = new PageProvider(page);
    IRequestHandler handler = new RenderPageRequestHandler(provider);

    Url url = encoder.mapHandler(handler);

    assertEquals("wicket/bookmarkable/" + PAGE_CLASS_NAME, url.toString());
  }
View Full Code Here

    if (e instanceof StalePageException)
    {
      // If the page was stale, just re-render it
      // (the url should always be updated by an redirect in that case)
      return new RenderPageRequestHandler(new PageProvider(((StalePageException)e).getPage()));
    }
    else if (e instanceof PageExpiredException)
    {
      return createPageRequestHandler(new PageProvider(Application.get()
        .getApplicationSettings()
View Full Code Here

TOP

Related Classes of org.apache.wicket.core.request.handler.RenderPageRequestHandler

Copyright © 2018 www.massapicom. 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.