Package org.apache.wicket.request.handler

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


    }
    else if (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler)
    {
      // listener interface URL with page class information
      BookmarkableListenerInterfaceRequestHandler handler = (BookmarkableListenerInterfaceRequestHandler)requestHandler;
      IRequestablePage page = handler.getPage();

      if (!checkPageClass(page.getClass()))
      {
        return null;
      }

      Integer renderCount = null;
      if (handler.getListenerInterface().isIncludeRenderCount())
      {
        renderCount = page.getRenderCount();
      }

      PageInfo pageInfo = new PageInfo(page.getPageId());
      ComponentInfo componentInfo = new ComponentInfo(renderCount,
        requestListenerInterfaceToString(handler.getListenerInterface()),
        handler.getComponent().getPageRelativePath(), handler.getBehaviorIndex());

      UrlInfo urlInfo = new UrlInfo(new PageComponentInfo(pageInfo, componentInfo),
        page.getClass(), handler.getPageParameters());
      return buildUrl(urlInfo);
    }

    return null;
  }
View Full Code Here


    PageAndComponentProvider provider = new PageAndComponentProvider(getPage(), this);
    int id = getBehaviorId(behaviour);
    IRequestHandler handler;
    if (getPage().isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, id);
    }
    else
    {
      handler = new ListenerInterfaceRequestHandler(provider, listener, id);
    }
View Full Code Here

  {
    PageAndComponentProvider provider = new PageAndComponentProvider(getPage(), this);
    IRequestHandler handler;
    if (getPage().isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener);
    }
    else
    {
      handler = new ListenerInterfaceRequestHandler(provider, listener);
    }
View Full Code Here

    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);

    assertEquals("some/mount/path/i1/i2?15-5.ILinkListener.4-foo-bar&a=b&b=c", url.toString());
View Full Code Here

    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);

    assertEquals("some/mount/path/i1/i2?15-4.ILinkListener-foo-bar&a=b&b=c", url.toString());
View Full Code Here

    Page page = getPage();
    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, id);
    }
    else
    {
      handler = new ListenerInterfaceRequestHandler(provider, listener, id);
    }
View Full Code Here

    Page page = getPage();
    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener);
    }
    else
    {
      handler = new ListenerInterfaceRequestHandler(provider, listener);
    }
View Full Code Here

    }
    else if (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler)
    {
      // listener interface URL with page class information
      BookmarkableListenerInterfaceRequestHandler handler = (BookmarkableListenerInterfaceRequestHandler)requestHandler;
      IRequestablePage page = handler.getPage();

      if (!checkPageClass(page.getClass()))
      {
        return null;
      }

      Integer renderCount = null;
      if (handler.getListenerInterface().isIncludeRenderCount())
      {
        renderCount = page.getRenderCount();
      }

      PageInfo pageInfo = new PageInfo(page);
      ComponentInfo componentInfo = new ComponentInfo(renderCount,
        requestListenerInterfaceToString(handler.getListenerInterface()),
        handler.getComponent().getPageRelativePath(), handler.getBehaviorIndex());

      UrlInfo urlInfo = new UrlInfo(new PageComponentInfo(pageInfo, componentInfo),
        page.getClass(), handler.getPageParameters());
      return buildUrl(urlInfo);
    }

    return null;
  }
View Full Code Here

    PageAndComponentProvider provider = new PageAndComponentProvider(getPage(), this);
    int index = getBehaviorsRawList().indexOf(behaviour);
    IRequestHandler handler;
    if (getPage().isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, index);
    }
    else
    {
      handler = new ListenerInterfaceRequestHandler(provider, listener, index);
    }
View Full Code Here

  {
    PageAndComponentProvider provider = new PageAndComponentProvider(getPage(), this);
    IRequestHandler handler;
    if (getPage().isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener);
    }
    else
    {
      handler = new ListenerInterfaceRequestHandler(provider, listener);
    }
View Full Code Here

TOP

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

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.