Package org.apache.wicket.request

Examples of org.apache.wicket.request.IRequestMapper


    // so the system mapper can interpret it
    String urlWoJSessionId = Strings.stripJSessionId(url);
    Url resolved = new Url(getRequest().getUrl());
    resolved.resolveRelative(Url.parse(urlWoJSessionId));

    IRequestMapper mapper = getApplication().getRootRequestMapper();
    Request request = getRequest().cloneWithUrl(resolved);
    IRequestHandler handler = mapper.mapRequest(request);

    if (handler != null)
    {
      getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);
    }
View Full Code Here


   *
   * @return compound instance of the root mapper
   */
  public final ICompoundRequestMapper getRootRequestMapperAsCompound()
  {
    IRequestMapper root = getRootRequestMapper();
    if (!(root instanceof ICompoundRequestMapper))
    {
      root = new CompoundRequestMapper().add(root);
      setRootRequestMapper(root);
    }
View Full Code Here

   *
   * @return compound instance of the root mapper
   */
  public final ICompoundRequestMapper getRootRequestMapperAsCompound()
  {
    IRequestMapper root = getRootRequestMapper();
    if (!(root instanceof ICompoundRequestMapper))
    {
      root = new CompoundRequestMapper().add(root);
      setRootRequestMapper(root);
    }
View Full Code Here

    // we transform the passed in url into wicket/page?x-y.IOnChangeListener-path-to-component
    // so the system mapper can interpret it
    Url resolved = new Url(getRequest().getUrl());
    resolved.resolveRelative(Url.parse(url));

    IRequestMapper mapper = getApplication().getRootRequestMapper();
    Request request = getRequest().cloneWithUrl(resolved);
    IRequestHandler handler = mapper.mapRequest(request);

    if (handler != null)
    {
      getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);
    }
View Full Code Here

      public void detach(IRequestCycle requestCycle)
      {
        detaches++;
      }
    };
    IRequestMapper requestMapper = new IRequestMapper()
    {
      public IRequestHandler mapRequest(Request request)
      {
        return handler;
      }
View Full Code Here

    // so the system mapper can interpret it
    String urlWoJSessionId = Strings.stripJSessionId(url);
    Url resolved = new Url(getRequest().getUrl());
    resolved.resolveRelative(Url.parse(urlWoJSessionId));

    IRequestMapper mapper = getApplication().getRootRequestMapper();
    Request request = getRequest().cloneWithUrl(resolved);
    IRequestHandler handler = mapper.mapRequest(request);

    if (handler != null)
    {
      getRequestCycle().scheduleRequestHandlerAfterCurrent(handler);
    }
View Full Code Here

   *
   * @return compound instance of the root mapper
   */
  public final ICompoundRequestMapper getRootRequestMapperAsCompound()
  {
    IRequestMapper root = getRootRequestMapper();
    if (!(root instanceof ICompoundRequestMapper))
    {
      root = new CompoundRequestMapper().add(root);
      setRootRequestMapper(root);
    }
View Full Code Here

   */
  public void testConstruct1()
  {
    try
    {
      IRequestMapper e = new MountedMapper("", MockPage.class);

      // should never get here
      assertFalse(true);
    }
    catch (IllegalArgumentException e)
View Full Code Here

  /**
   * Overriding mounting on '/' (see HomePageMapper) should be possible
   */
  public void testConstruct2()
  {
    IRequestMapper homePageMapper = new MountedMapper("/", MockPage.class);
    assertNotNull(homePageMapper);
  }
View Full Code Here

        /**
         * Install this {@code StaticResourceRewriteMapper} into the given application. The
         * {@code StaticResourceRewriteMapper} instance will not have any effect unless it is installed.
         */
        public void install(final WebApplication app) {
            final IRequestMapper delegate = new ResourceReferenceMapper(new PageParametersEncoder(),
                                                                        newParentFolderPlaceholder(app),
                                                                        newResourceCachingStrategy(app));

            final StaticResourceRewriteMapper mapper = new StaticResourceRewriteMapper(url, delegate);
            app.mount(mapper);
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.IRequestMapper

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.