Examples of startComponentInPage()


Examples of org.apache.wicket.util.tester.WicketTester.startComponentInPage()

    WicketTester tester = new WicketTester();

    Label label = new Label("label");
    label.add(new NodeBorder(new boolean[] { true, false, true }));

    tester.startComponentInPage(label);

    tester
      .assertResultPage("<div class=\"tree-branch tree-branch-mid\"><div class=\"tree-subtree\"><div class=\"tree-branch tree-branch-last\"><div class=\"tree-subtree\"><div class=\"tree-branch tree-branch-mid\"><span wicket:id=\"label\" class=\"tree-node\"></span></div></div></div></div></div>");
  }
}
View Full Code Here

Examples of org.apache.wicket.util.tester.WicketTester.startComponentInPage()

        DataSet dataSet = new DataSet(bloodhound);
        TypeaheadConfig config = new TypeaheadConfig(dataSet);

        Typeahead field = new Typeahead("typeahead", Model.of(""), config);
        tester.startComponentInPage(field, Markup.of("<html><head></head><body><input type='text' wicket:id='typeahead'/></body></html>"));


        OnDomReadyHeaderItem item = field.getDomReadyScript(config);
        String expected = "var engine = new Bloodhound({\"datumTokenizer\":function(d) { return Bloodhound.tokenizers.whitespace(d.value); },\"queryTokenizer\":Bloodhound.tokenizers.whitespace,\"remote\":\"./page?0-1.IBehaviorListener.0-typeahead&term=%QUERY\"});engine.initialize();$('#typeahead1').typeahead({},{\"source\":engine.ttAdapter(),\"name\":\"engine\"});";
        assertEquals(expected, item.getJavaScript());
View Full Code Here

Examples of org.apache.wicket.util.tester.WicketTester.startComponentInPage()

      {
        return new Progression(testProgressive.getProgress());
      }

    });
    wt.startComponentInPage(progressBar, null);
    wt.assertLabel("panelId:label", "0%");
    testProgressive.proceed(50);
    wt.assertLabel("panelId:label", "50%");
    assertTrue(progressBar.getOutputMarkupId());
  }
View Full Code Here

Examples of org.apache.wicket.util.tester.WicketTester.startComponentInPage()

  @Test
  public void testProgressBarMessage()
  {
    WicketTester wt = new WicketTester();
    final DummyTask testProgressive = new DummyTask();
    wt.startComponentInPage(new ProgressBar("panelId", new ProgressionModel()
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected Progression getProgression()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.