Package org.apache.wicket.core.request.handler

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


  private IRequestHandler createRequestHandler(RequestListenerInterface listener,
    PageParameters parameters, Integer id)
  {
    Page page = getPage();

    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);

    if (page.isPageStateless()
      || (getApplication().getPageSettings().getRecreateMountedPagesAfterExpiry()
        && page.isBookmarkable() && page.wasCreatedBookmarkable()))
    {
View Full Code Here


    if (wantOnSelectionChangedNotifications())
    {
      // we do not want relative URL here, because it will be used by
      // Form#dispatchEvent
      CharSequence url = urlFor(new ListenerInterfaceRequestHandler(
        new PageAndComponentProvider(getPage(), this, new PageParameters()),
        IOnChangeListener.INTERFACE));

      Form<?> form = findParent(Form.class);
      if (form != null)
      {
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

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

    processRequest(handler);
  }
View Full Code Here

  @Test
  public void additionalParameters()
  {
    MockPage page = new MockPage();
    IRequestableComponent c = page.get("foo:bar");
    PageAndComponentProvider provider = new PageAndComponentProvider(page, c);
    IRequestHandler handler = new ListenerInterfaceRequestHandler(provider,
      ILinkListener.INTERFACE);

    Url url = mapper.mapHandler(handler);
    url.addQueryParameter("q", "foo");
View Full Code Here

       */
      @Override
      protected String getOnClickScript(CharSequence url)
      {
        IRequestHandler handler = new ListenerInterfaceRequestHandler(
          new PageAndComponentProvider(getPage(), this), ILinkListener.INTERFACE);
        Url componentUrl = RequestCycle.get().mapUrlFor(handler);
        componentUrl.addQueryParameter("anticache", Math.random());
        return new AppendingStringBuffer("new Ajax.Updater('counter', '").append(
          componentUrl)
          .append("', {method:'get'}); return false;")
View Full Code Here

      {
        // WICKET-4594 - ignore the parsed parameters for stateful pages
        pageParameters = 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

  public final CharSequence urlFor(final Behavior behaviour,
    final RequestListenerInterface listener, final PageParameters parameters)
  {
    int id = getBehaviorId(behaviour);
    Page page = getPage();
    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, id);
    }
View Full Code Here

   */
  public final CharSequence urlFor(final RequestListenerInterface listener,
    final PageParameters parameters)
  {
    Page page = getPage();
    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener);
    }
View Full Code Here

        }
        else
        {
          ComponentInfo componentInfo = info.getComponentInfo();

          PageAndComponentProvider provider = new PageAndComponentProvider(
            info.getPageInfo().getPageId(), renderCount,
            componentInfo.getComponentPath());

          provider.setPageSource(getContext());

          // listener interface
          RequestListenerInterface listenerInterface = requestListenerInterfaceFromString(componentInfo.getListenerInterface());

          return new ListenerInterfaceRequestHandler(provider, listenerInterface,
View Full Code Here

TOP

Related Classes of org.apache.wicket.core.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.