Package org.apache.wicket.protocol.http

Examples of org.apache.wicket.protocol.http.WebApplication


   * @see org.apache.wicket.behavior.IBehaviorListener#onRequest()
   */
  @Override
  public final void onRequest()
  {
    WebApplication app = (WebApplication)getComponent().getApplication();
    AjaxRequestTarget target = app.newAjaxRequestTarget(getComponent().getPage());

    RequestCycle requestCycle = RequestCycle.get();
    requestCycle.scheduleRequestHandlerAfterCurrent(target);

    respond(target);
View Full Code Here


   * @param homePage
   *            a home page <code>Class</code>
   */
  public <C extends Page> BaseWicketTester(final Class<C> homePage)
  {
    this(new WebApplication()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      @Override
 
View Full Code Here

  /**
   * @see org.apache.wicket.behavior.IBehaviorListener#onRequest()
   */
  public final void onRequest()
  {
    WebApplication app = (WebApplication)getComponent().getApplication();
    AjaxRequestTarget target = app.newAjaxRequestTarget(getComponent().getPage());
    RequestCycle.get().setRequestTarget(target);
    respond(target);
  }
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      public void onClick()
      {
        WebApplication webApplication = (WebApplication)Application.get();
        webApplication.getRequestLoggerSettings().setRequestsWindowSize(500);
        boolean enabled = webApplication.getRequestLoggerSettings()
          .isRequestLoggerEnabled();
        webApplication.getRequestLoggerSettings().setRequestLoggerEnabled(!enabled);
      }
    };
    link.add(new Label("toggletext", new Model<String>()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public String getObject()
      {
        WebApplication webApplication = (WebApplication)Application.get();
        IRequestLogger requestLogger = webApplication.getRequestLogger();
        if (requestLogger == null)
        {
          return "Enable request recording";
        }
        else
View Full Code Here

    add(navigator);
  }

  IRequestLogger getRequestLogger()
  {
    WebApplication webApplication = (WebApplication)Application.get();
    final IRequestLogger requestLogger;
    if (webApplication.getRequestLogger() == null)
    {
      // make default one.
      requestLogger = new RequestLogger();
    }
    else
    {
      requestLogger = webApplication.getRequestLogger();
    }
    return requestLogger;
  }
View Full Code Here

  @Before
  public void before() throws Exception
  {

    tester = new WicketTester();
    WebApplication webApplication = tester.getApplication();
    webApplication.mountPage(EXPECTED_URL.toString(), DummyHomePage.class);
    mapper = new CryptoMapper(webApplication.getRootRequestMapper(), webApplication);
  }
View Full Code Here

   *
   * @throws Exception
   */
  public void test_3() throws Exception
  {
    tester = new WicketTester(new WebApplication()
    {
      /**
       * @see org.apache.wicket.protocol.http.WebApplication#newSession(Request, Response)
       */
      public Session newSession(Request request, Response response)
View Full Code Here

  }


   public void testNotSerializeable() throws Exception
   {
     WebApplication app = new WebApplication()
     {
       public Class getHomePage()
       {
         return null;
       }
View Full Code Here

   *
   * @param homePage
   */
  public BaseWicketTester(final Class homePage)
  {
    this(new WebApplication()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      public Class getHomePage()
View Full Code Here

   *
   * @param homePage
   */
  public WicketTester(final Class homePage)
  {
    this(new WebApplication()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      public Class getHomePage()
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.WebApplication

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.