Package org.apache.wicket.request.component

Examples of org.apache.wicket.request.component.IRequestablePage


  {
    Url url = Url.parse("some/mount/path?15");
    IRequestHandler handler = encoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof RenderPageRequestHandler);
    IRequestablePage page = ((RenderPageRequestHandler)handler).getPage();
    checkPage(page, 15);
  }
View Full Code Here


  {
    Url url = Url.parse("some/mount/path/i1/i2?15&a=b&b=c");
    IRequestHandler handler = encoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof RenderPageRequestHandler);
    IRequestablePage page = ((RenderPageRequestHandler)handler).getPage();
    checkPage(page, 15);

    PageParameters p = page.getPageParameters();
    assertEquals(0, p.getIndexedCount());

    assertEquals(0, p.getNamedKeys().size());
  }
View Full Code Here

    assertTrue(handler instanceof ListenerInterfaceRequestHandler);

    ListenerInterfaceRequestHandler h = (ListenerInterfaceRequestHandler)handler;

    IRequestablePage page = h.getPage();
    checkPage(page, 15);

    assertEquals(ILinkListener.INTERFACE, h.getListenerInterface());
    assertEquals("foo:bar", h.getComponent().getPageRelativePath());
    assertNull(h.getBehaviorIndex());
View Full Code Here

    IRequestHandler handler = encoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof ListenerInterfaceRequestHandler);
    ListenerInterfaceRequestHandler h = (ListenerInterfaceRequestHandler)handler;

    IRequestablePage page = h.getPage();
    checkPage(page, 15);

    assertEquals(ILinkListener.INTERFACE, h.getListenerInterface());
    assertEquals("foo:bar", h.getComponent().getPageRelativePath());

    PageParameters p = page.getPageParameters();
    assertEquals(0, p.getIndexedCount());

    assertEquals(0, p.getNamedKeys().size());
  }
View Full Code Here

    assertTrue(handler instanceof ListenerInterfaceRequestHandler);

    ListenerInterfaceRequestHandler h = (ListenerInterfaceRequestHandler)handler;

    IRequestablePage page = h.getPage();
    checkPage(page, 15);

    assertEquals(ILinkListener.INTERFACE, h.getListenerInterface());
    assertEquals("foo:bar", h.getComponent().getPageRelativePath());
    assertEquals((Object)4, h.getBehaviorIndex());
View Full Code Here

    assertTrue(handler instanceof ListenerInterfaceRequestHandler);

    ListenerInterfaceRequestHandler h = (ListenerInterfaceRequestHandler)handler;

    IRequestablePage page = h.getPage();
    assertEquals(5, page.getRenderCount());
  }
View Full Code Here

    IRequestHandler handler = encoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof ListenerInterfaceRequestHandler);

    ListenerInterfaceRequestHandler h = (ListenerInterfaceRequestHandler)handler;
    IRequestablePage page = h.getPage();
    checkPage(page, 1);

    assertEquals(ILinkListener.INTERFACE, h.getListenerInterface());
    assertEquals("foo:bar", h.getComponent().getPageRelativePath());
    assertNull(h.getBehaviorIndex());

    PageParameters p = page.getPageParameters();
    assertEquals(2, p.getIndexedCount());

    assertEquals(2, p.getNamedKeys().size());
  }
View Full Code Here

  {
    Url url = Url.parse("some/p1/path/p2");
    IRequestHandler handler = placeholderEncoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof RenderPageRequestHandler);
    IRequestablePage page = ((RenderPageRequestHandler)handler).getPage();

    assertEquals(0, page.getPageParameters().getIndexedCount());
    assertTrue(page.getPageParameters().getNamedKeys().size() == 2);
    assertEquals("p1", page.getPageParameters().get("param1").toString());
    assertEquals("p2", page.getPageParameters().get("param2").toString());
  }
View Full Code Here

  {
    Url url = Url.parse("some/p1/path/p2/indexed1?a=b&b=c");
    IRequestHandler handler = placeholderEncoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof RenderPageRequestHandler);
    IRequestablePage page = ((RenderPageRequestHandler)handler).getPage();

    PageParameters p = page.getPageParameters();
    assertEquals(1, p.getIndexedCount());
    assertEquals("indexed1", p.get(0).toString());

    assertEquals(4, p.getNamedKeys().size());
    assertEquals("b", p.get("a").toString());
    assertEquals("c", p.get("b").toString());
    assertEquals("p1", page.getPageParameters().get("param1").toString());
    assertEquals("p2", page.getPageParameters().get("param2").toString());
  }
View Full Code Here

  {
    Url url = Url.parse("some/p1/path/p2/p3/p4");
    IRequestHandler handler = placeholderEncoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof RenderPageRequestHandler);
    IRequestablePage page = ((RenderPageRequestHandler)handler).getPage();

    assertEquals(2, page.getPageParameters().getIndexedCount());
    assertTrue(page.getPageParameters().getNamedKeys().size() == 2);
    assertEquals("p1", page.getPageParameters().get("param1").toString());
    assertEquals("p2", page.getPageParameters().get("param2").toString());
    assertEquals("p3", page.getPageParameters().get(0).toString());
    assertEquals("p4", page.getPageParameters().get(1).toString());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.component.IRequestablePage

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.