Package org.apache.wicket.request

Examples of org.apache.wicket.request.IRequestMapper


   *
   * @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


      logMappers(list, request.getUrl().toString());
    }

    for (MapperWithScore mapperWithScore : list)
    {
      IRequestMapper mapper = mapperWithScore.getMapper();
      IRequestHandler handler = mapper.mapRequest(request);
      if (handler != null)
      {
        return handler;
      }
    }
View Full Code Here

    final Url url = Url.parse(path);
    final Request request = createRequest(url);

    for (Iterator<IRequestMapper> itor = iterator(); itor.hasNext();)
    {
      IRequestMapper mapper = itor.next();
      if (mapper.mapRequest(request) != null)
      {
        remove(mapper);
      }
    }
  }
View Full Code Here

      public String encodeURL(CharSequence url)
      {
        return url + JSESSIONID;
      }
    };
    IRequestMapper mapper = mock(IRequestMapper.class);

    Url bookmarkablePageUrl = Url.parse(BOOKMARKABLE_PAGE_URL);
    when(mapper.mapHandler(argThat(new ExactClassMatcher<BookmarkablePageRequestHandler>(BookmarkablePageRequestHandler.class)))).thenReturn(bookmarkablePageUrl);

    Url resourceUrl = Url.parse(RESOURCE_URL);
    when(mapper.mapHandler(argThat(new ExactClassMatcher<ResourceRequestHandler>(ResourceRequestHandler.class)))).thenReturn(resourceUrl);

    Url resourceReferenceUrl = Url.parse(RES_REF_URL);
    when(mapper.mapHandler(argThat(new ExactClassMatcher<ResourceReferenceRequestHandler>(ResourceReferenceRequestHandler.class)))).thenReturn(resourceReferenceUrl);

    IExceptionMapper exceptionMapper = mock(IExceptionMapper.class);
    RequestCycleContext context = new RequestCycleContext(request, response, mapper, exceptionMapper);

    requestCycle = new RequestCycle(context);
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

   *
   */
  @Test(expected = IllegalArgumentException.class)
  public void construct1()
  {
    IRequestMapper e = new MountedMapper("", MockPage.class);
  }
View Full Code Here

   * Overriding mounting on '/' (see HomePageMapper) should be possible
   */
  @Test
  public void construct2()
  {
    IRequestMapper homePageMapper = new MountedMapper("/", MockPage.class);
    assertNotNull(homePageMapper);
  }
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

   *
   */
  @Test(expected = IllegalArgumentException.class)
  public void construct1()
  {
    IRequestMapper e = new MountedMapper("", MockPage.class);
  }
View Full Code Here

   * Overriding mounting on '/' (see HomePageMapper) should be possible
   */
  @Test
  public void construct2()
  {
    IRequestMapper homePageMapper = new MountedMapper("/", MockPage.class);
    assertNotNull(homePageMapper);
  }
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.