Package org.apache.wicket.request.handler

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


    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;
      Class<? extends IRequestablePage> pageClass = handler.getPageClass();

      if (!checkPageClass(pageClass))
      {
        return null;
      }

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

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

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

    return null;
  }
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

    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(PAGE_CLASS_NAME + "/i1/i2?15-0.ILinkListener-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, 4);

    Url url = encoder.mapHandler(handler);

    assertEquals(PAGE_CLASS_NAME + "/i1/i2?15-0.ILinkListener.4-foo-bar&a=b&b=c",
View Full Code Here

    }
    else if (requestHandler instanceof BookmarkableListenerInterfaceRequestHandler)
    {
      // listener interface URL with page class information
      BookmarkableListenerInterfaceRequestHandler handler = (BookmarkableListenerInterfaceRequestHandler)requestHandler;
      Class<? extends IRequestablePage> pageClass = handler.getPageClass();

      if (!checkPageClass(pageClass))
      {
        return null;
      }

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

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

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

    return null;
  }
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("wicket/bookmarkable/" + PAGE_CLASS_NAME +
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("wicket/bookmarkable/" + PAGE_CLASS_NAME +
View Full Code Here

        } else if (requestTarget instanceof ListenerInterfaceRequestHandler) {
            ListenerInterfaceRequestHandler target = (ListenerInterfaceRequestHandler) requestTarget;
            BrixNodeWebPage page = (BrixNodeWebPage) target.getPage();
            return encode(page);
        } else if (requestTarget instanceof BookmarkableListenerInterfaceRequestHandler) {
            BookmarkableListenerInterfaceRequestHandler target = (BookmarkableListenerInterfaceRequestHandler) requestTarget;
            BrixNodeWebPage page = (BrixNodeWebPage) target.getPage();
            BrixNode node = page.getModelObject();
            PageInfo info = new PageInfo(page.getPageId());
            String componentPath = target.getComponent().getPageRelativePath();

            // remove the page id from component path, we don't really need it
            componentPath = componentPath.substring(componentPath.indexOf(':') + 1);
            String iface = componentPath; // + ":" + target.getInterfaceName();
            return encode(node, page.getBrixPageParameters(), info, iface);
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.