Package org.apache.wicket.request

Examples of org.apache.wicket.request.IRequestHandler


   * @return Bookmarkable URL to page
   */
  public final <C extends Page> Url mapUrlFor(final Class<C> pageClass,
    final PageParameters parameters)
  {
    IRequestHandler handler = new BookmarkablePageRequestHandler(new PageProvider(pageClass,
      parameters));
    return mapUrlFor(handler);
  }
View Full Code Here


   * @return Bookmarkable URL to page
   */
  public final <C extends Page> CharSequence urlFor(final Class<C> pageClass,
    final PageParameters parameters)
  {
    IRequestHandler handler = new BookmarkablePageRequestHandler(new PageProvider(pageClass,
      parameters));
    return renderUrl(mapUrlFor(handler), handler);
  }
View Full Code Here

    if (type == null)
    {
      return null;
    }

    IRequestHandler result = getActiveRequestHandler();

    if (result == null || type.isAssignableFrom(result.getClass()) == false)
    {
      result = getRequestHandlerScheduledAfterCurrent();
      if (result == null || type.isAssignableFrom(result.getClass()) == false)
      {
        result = null;
      }
    }
View Full Code Here

   * @param requestCycle
   * @return BufferedWebResponse containing page body
   */
  protected BufferedWebResponse renderPage(Url targetUrl, RequestCycle requestCycle)
  {
    IRequestHandler scheduled = requestCycle.getRequestHandlerScheduledAfterCurrent();

    // keep the original response
    final Response originalResponse = requestCycle.getResponse();

    // buffered web response for page
View Full Code Here

    notify(new INotifier<IRequestCycleListener>()
    {
      @Override
      public void notify(IRequestCycleListener listener)
      {
        IRequestHandler handler = listener.onException(cycle, ex);
        if (handler != null)
        {
          handlers.add(handler);
        }
      }
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

    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


  @Override
  public final IRequestHandler mapRequest(Request request)
  {
    IRequestHandler handler = delegate.mapRequest(request);

    Scheme desired = getDesiredSchemeFor(handler);
    Scheme current = getSchemeOf(request);
    if (!desired.isCompatibleWith(current))
    {
View Full Code Here

    // only in development mode validate the headers
    if (getApplication().usesDevelopmentConfig())
    {
      // Ignore if an exception and a redirect happened in between (e.g.
      // RestartResponseAtInterceptPageException)
      IRequestHandler activeHandler = getRequestCycle().getActiveRequestHandler();
      if (activeHandler instanceof IPageRequestHandler)
      {
        IPageRequestHandler h = (IPageRequestHandler)activeHandler;
        if (h.getPage() == this)
        {
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.