Package org.apache.wicket.request.handler

Examples of org.apache.wicket.request.handler.ListenerInterfaceRequestHandler


    Url url = Url.parse("some/mount/path?15-ILinkListener-foo-bar");
    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());
    assertNull(h.getBehaviorIndex());
  }
View Full Code Here


  {
    Url url = Url.parse("some/mount/path/i1/i2?15-ILinkListener-foo-bar&a=b&b=c");
    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(2, p.getIndexedCount());
    assertEquals("i1", p.get(0).toString());
    assertEquals("i2", p.get(1).toString());
View Full Code Here

    Url url = Url.parse("some/mount/path?15-ILinkListener.4-foo-bar");
    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());
    assertEquals((Object)4, h.getBehaviorIndex());
  }
View Full Code Here

    context.setNextPageRenderCount(5);
    IRequestHandler handler = encoder.mapRequest(getRequest(url));

    assertTrue(handler instanceof ListenerInterfaceRequestHandler);

    ListenerInterfaceRequestHandler h = (ListenerInterfaceRequestHandler)handler;

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

    Url url = Url.parse(MOUNT_PATH + "/" + PAGE_CLASS_NAME + "?15-ILinkListener-foo-bar");
    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());
    assertNull(h.getBehaviorIndex());
  }
View Full Code Here

    Url url = Url.parse(MOUNT_PATH + "/" + PAGE_CLASS_NAME +
      "/i1/i2?15-ILinkListener-foo-bar&a=b&b=c");
    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(2, p.getIndexedCount());
    assertEquals("i1", p.get(0).toString());
    assertEquals("i2", p.get(1).toString());
View Full Code Here

    Url url = Url.parse(MOUNT_PATH + "/" + PAGE_CLASS_NAME + "?15-ILinkListener.4-foo-bar");
    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());
    assertEquals((Object)4, h.getBehaviorIndex());
  }
View Full Code Here

    context.setNextPageRenderCount(5);

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

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

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

      PageAndComponentProvider provider = new PageAndComponentProvider(pageInfo.getPageId(),
        pageClass, pageParameters, renderCount, componentInfo.getComponentPath());

      provider.setPageSource(getContext());

      return new ListenerInterfaceRequestHandler(provider, listenerInterface,
        componentInfo.getBehaviorId());
    }
    else
    {
      if (logger.isWarnEnabled())
View Full Code Here

  {
    Args.notNull(component, "component");

    // there are two ways to do this. RequestCycle could be forced to call the handler
    // directly but constructing and parsing the URL increases the chance of triggering bugs
    IRequestHandler handler = new ListenerInterfaceRequestHandler(new PageAndComponentProvider(
      component.getPage(), component), listener);

    Url url = urlFor(handler);
    MockHttpServletRequest request = new MockHttpServletRequest(application, httpSession,
      servletContext);
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.handler.ListenerInterfaceRequestHandler

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.