Package org.apache.wicket.request

Examples of org.apache.wicket.request.IRequestHandler


  {
    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);
    request.setUrl(url);
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

    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

   *            the sequence number of the star
   * @return the url pointing to the image for active stars.
   */
  protected String getActiveStarUrl(final int iteration)
  {
    IRequestHandler handler = new ResourceReferenceRequestHandler(STAR1);
    return getRequestCycle().urlFor(handler).toString();
  }
View Full Code Here

   *            the sequence number of the star
   * @return the url pointing to the image for inactive stars.
   */
  protected String getInactiveStarUrl(final int iteration)
  {
    IRequestHandler handler = new ResourceReferenceRequestHandler(STAR0);
    return getRequestCycle().urlFor(handler).toString();
  }
View Full Code Here

   */
  private Page extractCurrentPage()
  {
    final RequestCycle requestCycle = RequestCycle.get();

    IRequestHandler handler = requestCycle.getActiveRequestHandler();

    if (handler == null)
    {
      handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }
View Full Code Here

    if (shouldRedirectToPage(requestCycle))
    {
      // the page itself has been added to the request target, we simply issue a redirect
      // back to the page
      IRequestHandler handler = new RenderPageRequestHandler(new PageProvider(page));
      final String url = rc.urlFor(handler).toString();
      response.sendRedirect(url);
      return;
    }
View Full Code Here

    try
    {
      set(this);
      listeners.onBeginRequest(this);
      onBeginRequest();
      IRequestHandler handler = resolveRequestHandler();
      if (handler != null)
      {
        execute(handler);
        return true;
      }

      // Did not find any suitable handler, thus not executing the request
      log.debug(
        "No suitable handler found for URL {}, falling back to container to process this request",
        request.getUrl());
    }
    catch (Exception e)
    {
      IRequestHandler handler = handleException(e);
      if (handler != null)
      {
        listeners.onExceptionRequestHandlerResolved(this, handler, e);
        executeExceptionRequestHandler(handler, getExceptionRetryCount());
        listeners.onRequestHandlerExecuted(this, handler);
View Full Code Here

      requestHandlerExecutor.execute(handler);
      listeners.onRequestHandlerExecuted(this, handler);
    }
    catch (RuntimeException e)
    {
      IRequestHandler replacement = requestHandlerExecutor.resolveHandler(e);
      if (replacement != null)
      {
        execute(replacement);
      }
      else
View Full Code Here

    }
    catch (Exception e)
    {
      if (retryCount > 0)
      {
        IRequestHandler next = handleException(e);
        if (next != null)
        {
          executeExceptionRequestHandler(next, retryCount - 1);
          return;
        }
View Full Code Here

TOP

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

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.