Package org.apache.wicket.request.handler

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


    // as this explicitely says the url must be bookmarkable
    page.setCreatedBookmarkable(false);

    IRequestableComponent c = page.get("foo:bar");

    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new BookmarkableListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE, 4);

    Url url = encoder.mapHandler(handler);
View Full Code Here


      listenerInterface = requestListenerInterfaceFromString(componentInfo.getListenerInterface());
    }

    if (listenerInterface != null)
    {
      PageAndComponentProvider provider = new PageAndComponentProvider(pageInfo.getPageId(),
        pageClass, pageParameters, renderCount, componentInfo.getComponentPath());

      provider.setPageSource(getContext());

      return new ListenerInterfaceRequestHandler(provider, listenerInterface,
        componentInfo.getBehaviorId());
    }
    else
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

    int id = getBehaviorId(behaviour);
    Page page = getPage();
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      PageAndComponentProvider provider = new PageAndComponentProvider(page.getPageId(),
        page.getPageClass(), page.getPageParameters(), page.getRenderCount(),
        getPageRelativePath());
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, id);
    }
    else
    {
      PageAndComponentProvider provider = new PageAndComponentProvider(page, this);
      handler = new ListenerInterfaceRequestHandler(provider, listener, id);
    }
    return getRequestCycle().urlFor(handler);
  }
View Full Code Here

  {
    Page page = getPage();
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      PageAndComponentProvider provider = new PageAndComponentProvider(page.getPageId(),
        page.getPageClass(), page.getPageParameters(), page.getRenderCount(),
        getPageRelativePath());
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener);
    }
    else
    {
      PageAndComponentProvider provider = new PageAndComponentProvider(page, this);
      handler = new ListenerInterfaceRequestHandler(provider, listener);
    }
    return getRequestCycle().urlFor(handler);
  }
View Full Code Here

    // as this explicitely says the url must be bookmarkable
    page.setCreatedBookmarkable(false);

    IRequestableComponent c = page.get("foo:bar");

    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new BookmarkableListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE);

    Url url = encoder.mapHandler(handler);
View Full Code Here

    // as this explicitely says the url must be bookmarkable
    page.setCreatedBookmarkable(false);

    IRequestableComponent c = page.get("foo:bar");

    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new BookmarkableListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE, 4);

    Url url = encoder.mapHandler(handler);
View Full Code Here

    MockPage page = new MockPage(15);
    page.setRenderCount(5);

    IRequestableComponent c = page.get("a:b:c");

    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new ListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE);

    Url url = encoder.mapHandler(handler);
    assertEquals("wicket/page?15-5.ILinkListener-a-b-c", url.toString());
View Full Code Here

    // as this explicitely says the url must be bookmarkable
    page.setCreatedBookmarkable(false);

    IRequestableComponent c = page.get("foo:bar");

    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new BookmarkableListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE);

    Url url = encoder.mapHandler(handler);
View Full Code Here

    // as this explicitely says the url must be bookmarkable
    page.setCreatedBookmarkable(false);

    IRequestableComponent c = page.get("foo:bar");

    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new BookmarkableListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE, 4);

    Url url = encoder.mapHandler(handler);
View Full Code Here

TOP

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

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.