Package org.apache.wicket.protocol.http

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


  protected void setUp() throws Exception
  {
    tester = new WicketTester();
    tester.getApplication().getResourceSettings().addStringResourceLoader(
        new BundleStringResourceLoader("org.apache.wicket.model.StringResourceModelTest"));
    page = new MockPage();
    ws = new WeatherStation();
    wsModel = new Model(ws);
  }
View Full Code Here


    // set up necessary objects to emulate a form submission

    RequestCycle cycle = tester.createRequestCycle();

    // this could have been any page it seems. see comment at method
    MockPage page = new MockPage();

    // create component hierarchy

    final Form form = new Form("form", new CompoundPropertyModel(modelObject))
    {
      private static final long serialVersionUID = 1L;

      public String getMarkupId()
      {
        // hack for the fact that this test doesn't relate to any markup
        return "foo";
      }
    };

    final CheckGroup group = new CheckGroup("prop1");

    final WebMarkupContainer container = new WebMarkupContainer("container");

    final Check choice1 = new Check("check1", new Model(check1));
    final Check choice2 = new Check("prop2");

    page.add(form);
    form.add(group);
    group.add(container);
    container.add(choice1);
    group.add(choice2);
View Full Code Here

    // set up necessary objects to emulate a form submission

    RequestCycle cycle = tester.createRequestCycle();

    // this could have been any page it seems. see comment at method
    MockPage page = new MockPage();

    // create component hierarchy

    final Form form = new Form("form", new CompoundPropertyModel(modelObject))
    {
      private static final long serialVersionUID = 1L;

      public String getMarkupId()
      {
        // hack for the fact that this test doesn't relate to any markup
        return "foo";
      }
    };

    final RadioGroup group = new RadioGroup("prop1");

    final WebMarkupContainer container = new WebMarkupContainer("container");

    final Radio choice1 = new Radio("radio1", new Model(radio1));
    final Radio choice2 = new Radio("prop2");

    final RadioGroup group2 = new RadioGroup("group2", model);

    final Radio choice3 = new Radio("radio3", new Model(radio1));

    page.add(form);
    form.add(group);
    group.add(container);
    container.add(choice1);
    group.add(choice2);
    form.add(group2);
View Full Code Here

TOP

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

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.