Package org.apache.wicket.request

Examples of org.apache.wicket.request.IRequestHandler


  public void onUnauthorizedRequest(IResource resource, PageParameters parameters)
  {
    RequestCycle cycle = RequestCycle.get();
    if (cycle != null)
    {
      IRequestHandler handler = new ErrorCodeRequestHandler(HttpServletResponse.SC_FORBIDDEN, createErrorMessage(resource, parameters));
      cycle.replaceAllRequestHandlers(handler);
    }
  }
View Full Code Here


    // should be null for Pages
    componentInPage = null;

    // prepare request
    request.setURL(request.getContextPath() + request.getServletPath() + "/");
    IRequestHandler handler = new RenderPageRequestHandler(pageProvider);

    // process request
    processRequest(request, handler);

    // The page rendered
View Full Code Here

  public ResourceReference startResourceReference(final ResourceReference reference,
    final PageParameters pageParameters)
  {
    // prepare request
    request.setURL(request.getContextPath() + request.getServletPath() + "/");
    IRequestHandler handler = new ResourceReferenceRequestHandler(reference, pageParameters);

    // execute request
    processRequest(request, handler);

    // the reference processed
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);

    Url url = urlFor(handler);
    MockHttpServletRequest request = new MockHttpServletRequest(application, httpSession,
      servletContext);
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

    @Override
    public IRequestHandler mapRequest(Request request)
    {
      if (forcedHandler != null)
      {
        IRequestHandler handler = forcedHandler;
        forcedHandler = null;
        return handler;
      }
      else
      {
View Full Code Here

    final RequestListenerInterface listener, final PageParameters parameters)
  {
    int id = getBehaviorId(behaviour);
    Page page = getPage();
    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener, id);
    }
    else
View Full Code Here

  public final CharSequence urlFor(final RequestListenerInterface listener,
    final PageParameters parameters)
  {
    Page page = getPage();
    PageAndComponentProvider provider = new PageAndComponentProvider(page, this, parameters);
    IRequestHandler handler;
    if (page.isPageStateless())
    {
      handler = new BookmarkableListenerInterfaceRequestHandler(provider, listener);
    }
    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

   * @param e
   * @return RequestHandler instance
   */
  protected IRequestHandler handleException(final Exception e)
  {
    IRequestHandler handler = listeners.onException(this, e);
    if (handler != null)
    {
      return handler;
    }
    return exceptionMapper.map(e);
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.