Package org.apache.wicket.protocol.http

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


   * @param homePage
   *            a home page <code>Class</code>
   */
  public BaseWicketTester(final Class homePage)
  {
    this(new WebApplication()
    {
      /**
       * @see org.apache.wicket.Application#getHomePage()
       */
      public Class getHomePage()
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 requestCycle = RequestCycle.get();
    requestCycle.scheduleRequestHandlerAfterCurrent(target);

    Url oldBaseURL = requestCycle.getUrlRenderer().getBaseUrl();
View Full Code Here

    HttpSession httpSession = httpServletRequest.getSession(false);
    if (httpSession != null)
    {
      if (sessionKey == null)
      {
        WebApplication application = (WebApplication)Application.get(filterName);
        sessionKey = application.getSessionAttributePrefix(null) +
          Session.SESSION_ATTRIBUTE_NAME;

        if (log.isDebugEnabled())
        {
          log.debug("will use " + sessionKey +
View Full Code Here

  WicketTester wicketTester;

  @Before
  public void setup()
  {
    final WebApplication application = new WebApplication()
    {

      @Override
      public Class<? extends Page> getHomePage()
      {
        return VersioningTestPage.class;
      }
    };

    wicketTester = new WicketTester(application)
    {

      /**
       * @see org.apache.wicket.util.tester.BaseWicketTester#newTestPageManagerProvider()
       */
      @Override
      protected IPageManagerProvider newTestPageManagerProvider()
      {
        return new IPageManagerProvider()
        {

          public IPageManager get(final IPageManagerContext context)
          {

            final IDataStore dataStore = new InMemoryPageStore();
            final AsynchronousDataStore asyncDS = new AsynchronousDataStore(dataStore);
            final DefaultPageStore pageStore = new DefaultPageStore(
              application.getName(), asyncDS, 40);
            return new PersistentPageManager(application.getName(), pageStore, context);
          }
        };
      }

    };
View Full Code Here

{
  private MarkupCache cache;
  private MarkupCachingAssumingComponent component;

  public void setUp() {
    WebApplication application = new WicketTester.DummyWebApplication() {
      public String getConfigurationType()
      {
        return Application.DEPLOYMENT;
      }
    };
View Full Code Here

  /**
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception
  {
    tester = new WicketTester(new WebApplication()
    {

      public Class getHomePage()
      {
        return HomePage.class;
View Full Code Here

   * @see org.apache.wicket.WicketTestCase#setUp()
   */

  protected void setUp() throws Exception
  {
    WebApplication app = new DummyApplication();
    tester = new WicketTester(app);
  }
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

  }


  public void testNotSerializeable() throws Exception
  {
    WebApplication app = new WebApplication()
    {
      @Override
      public Class<? extends Page> getHomePage()
      {
        return null;
View Full Code Here

   */
  @Override
  protected void setUp() throws Exception
  {
    person = new Person();
    app = new MockWebApplication(new WebApplication()
    {

      @Override
      public Class<? extends Page> 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.