Package org.apache.wicket.request.handler

Examples of org.apache.wicket.request.handler.IPageRequestHandler


      // 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)
        {
          validateHeaders();
        }
      }
    }
View Full Code Here


      sb.append("(").append(pageRequestHandler.getPageParameters()).append(")");
      sb.append("]");
    }
    else if (requestHandler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)requestHandler;
      sb.append("PageRequest[");
      sb.append(pageRequestHandler.getPage().getClass().getName());
      sb.append("(");
      sb.append(pageRequestHandler.getPage().getId());
      sb.append(")]");
    }
    else if (requestHandler instanceof ResourceReferenceRequestHandler)
    {
      ResourceReferenceRequestHandler resourceRefenceHandler = (ResourceReferenceRequestHandler)requestHandler;
View Full Code Here

      handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }

    if (handler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)handler;
      return (Page)pageRequestHandler.getPage();
    }
    return null;
  }
View Full Code Here

    final WicketTester tester = new WicketTester(application);
    ThreadContext.setApplication(application);

    HttpsRequestChecker checker = new HttpsRequestChecker();

    IPageRequestHandler httpsPageRequestHandler = Mockito.mock(IPageRequestHandler.class);
    Mockito.doReturn(HttpsPage.class).when(httpsPageRequestHandler).getPageClass();

    HttpsConfig httpsConfig = new HttpsConfig();

    IRequestHandler httpsPageSecureIncoming = checker.checkSecureIncoming(
      httpsPageRequestHandler, httpsConfig);
    assertTrue(httpsPageSecureIncoming instanceof SwitchProtocolRequestHandler);

    IPageRequestHandler httpPageRequestHandler = Mockito.mock(IPageRequestHandler.class);
    Mockito.doReturn(HttpPage.class).when(httpsPageRequestHandler).getPageClass();

    IRequestHandler httpPageSecureIncoming = checker.checkSecureIncoming(
      httpPageRequestHandler, httpsConfig);
    assertSame(httpPageRequestHandler, httpPageSecureIncoming);
View Full Code Here

      // 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)
        {
          validateHeaders();
        }
      }
    }
View Full Code Here

    Page currentPage = null;

    if (activeRequestHandler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)activeRequestHandler;
      currentPage = (Page)pageRequestHandler.getPage();
    }

    return currentPage;
  }
View Full Code Here

      handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }

    if (handler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)handler;
      return (Page)pageRequestHandler.getPage();
    }
    return null;
  }
View Full Code Here

      handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }

    if (handler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)handler;
      return (Page)pageRequestHandler.getPage();
    }
    return null;
  }
View Full Code Here

      handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }

    if (handler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)handler;
      return (Page)pageRequestHandler.getPage();
    }
    return null;
  }
View Full Code Here

    final WicketTester tester = new WicketTester(application);
    ThreadContext.setApplication(application);

    HttpsRequestChecker checker = new HttpsRequestChecker();

    IPageRequestHandler httpsPageRequestHandler = Mockito.mock(IPageRequestHandler.class);
    Mockito.doReturn(HttpsPage.class).when(httpsPageRequestHandler).getPageClass();

    HttpsConfig httpsConfig = new HttpsConfig();

    IRequestHandler httpsPageSecureIncoming = checker.checkSecureIncoming(
      httpsPageRequestHandler, httpsConfig);
    assertTrue(httpsPageSecureIncoming instanceof SwitchProtocolRequestHandler);

    IPageRequestHandler httpPageRequestHandler = Mockito.mock(IPageRequestHandler.class);
    Mockito.doReturn(HttpPage.class).when(httpsPageRequestHandler).getPageClass();

    IRequestHandler httpPageSecureIncoming = checker.checkSecureIncoming(
      httpPageRequestHandler, httpsConfig);
    assertSame(httpPageRequestHandler, httpPageSecureIncoming);
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.handler.IPageRequestHandler

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.