Examples of IRequestMapper


Examples of org.apache.wicket.request.IRequestMapper

    Collections.sort(list);

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

Examples of org.apache.wicket.request.IRequestMapper

    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

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

Examples of org.apache.wicket.request.IRequestMapper

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

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

Examples of org.apache.wicket.request.IRequestMapper

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

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

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

Examples of org.apache.wicket.request.IRequestMapper

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

Examples of org.apache.wicket.request.IRequestMapper

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

Examples of org.apache.wicket.request.IRequestMapper

    // 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

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
TOP
Copyright © 2018 www.massapi.com. 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.