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


      handler = requestCycle.getRequestHandlerScheduledAfterCurrent();
    }

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

    {
      super.onAfterRender();

      RequestCycle cycle = getRequestCycle();

      IPageRequestHandler firstHandler = PageRequestHandlerTracker.getFirstHandler(cycle);
      assertEquals(PageA.class, firstHandler.getPageClass());

      IPageRequestHandler lastHandler = PageRequestHandlerTracker.getLastHandler(cycle);
      assertEquals(PageB.class, lastHandler.getPageClass());
    }
View Full Code Here

  {
    Url homeUrl = null;

    if (requestHandler instanceof IPageRequestHandler)
    {
      IPageRequestHandler pageRequestHandler = (IPageRequestHandler)requestHandler;

      if (pageRequestHandler.getPageClass().equals(Application.get().getHomePage()))
      {
        String locale = Session.get().getLocale().toString();
        homeUrl = new Url();
        homeUrl.getSegments().add(0, locale);
      }
View Full Code Here

  @Test
  public void checkSecureIncoming()
  {
    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

      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

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

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.