Package org.apache.wicket.protocol.http.documentvalidation

Examples of org.apache.wicket.protocol.http.documentvalidation.TextContent


    Tag html = new Tag("html");
    Tag head = new Tag("head");
    html.addExpectedChild(head);
    Tag title = new Tag("title");
    head.addExpectedChild(title);
    title.addExpectedChild(new TextContent("Paged Table Page"));
    Tag body = new Tag("body");
    html.addExpectedChild(body);

    Tag ulTable = new Tag("ul");
    ulTable.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new TextContent(
      "one"))));
    ulTable.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new TextContent(
      "two"))));
    // note that we DO NOT expect the third element as this is not on the current page
    body.addExpectedChild(ulTable);

    Tag ulNav = new Tag("ul");
    ulNav.addExpectedChild(new Tag("li").addExpectedChild(new Tag("a").addExpectedChild(new Tag(
      "span").addExpectedChild(new TextContent("1")))));
    ulNav.addExpectedChild(new Tag("li").addExpectedChild(new Tag("a").addExpectedChild(new Tag(
      "span").addExpectedChild(new TextContent("2")))));

    body.addExpectedChild(ulNav);

    validator.addRootElement(html);
View Full Code Here


    Tag html = new Tag("html");
    Tag head = new Tag("head");
    html.addExpectedChild(head);
    Tag title = new Tag("title");
    head.addExpectedChild(title);
    title.addExpectedChild(new TextContent("Attribute Modifier Test Page"));
    Tag body = new Tag("body");
    html.addExpectedChild(body);

    Tag label1 = new Tag("span");
    label1.addExpectedAttribute("class", "label");
    label1.addExpectedChild(new TextContent("Label 1"));
    body.addExpectedChild(label1);

    Tag label2 = new Tag("span");
    label2.addExpectedAttribute("class", "overrideLabel");
    label2.addExpectedChild(new TextContent("Label 2"));
    body.addExpectedChild(label2);

    Tag label3 = new Tag("span");
    label3.addExpectedAttribute("class", "insertLabel");
    label3.addExpectedChild(new TextContent("Label 3"));
    body.addExpectedChild(label3);

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

  {
    HtmlDocumentValidator validator = new HtmlDocumentValidator();
    Tag html = new Tag("html");
    Tag body = new Tag("body");
    html.addExpectedChild(body);
    body.addExpectedChild(new TextContent("\\s+"));
    Tag span = new Tag("span");
    body.addExpectedChild(span);
    Tag wicket = new Tag("wicket:panel");
    span.addExpectedChild(wicket);

    wicket.addExpectedChild(new TextContent("\\s*Panel Content"));

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

  private boolean validatePage2(String document)
  {
    HtmlDocumentValidator validator = new HtmlDocumentValidator();
    Tag html = new Tag("html");
    Tag body = new Tag("body");
    body.addExpectedChild(new TextContent("\\s+"));
    html.addExpectedChild(body);
    Tag span = new Tag("span");
    body.addExpectedChild(span);

    span.addExpectedChild(new TextContent("\\s*Panel Content"));

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

    Tag html = new Tag("html");
    Tag head = new Tag("head");
    html.addExpectedChild(head);
    Tag title = new Tag("title");
    head.addExpectedChild(title);
    title.addExpectedChild(new TextContent("Attribute Modifier Test Page"));
    Tag body = new Tag("body");
    html.addExpectedChild(body);

    Tag label1 = new Tag("span");
    label1.addExpectedAttribute("class", "label");
    label1.addExpectedChild(new TextContent("Label 1"));
    body.addExpectedChild(label1);

    Tag label2 = new Tag("span");
    label2.addExpectedAttribute("class", "overrideLabel");
    label2.addExpectedChild(new TextContent("Label 2"));
    body.addExpectedChild(label2);

    Tag label3 = new Tag("span");
    label3.addExpectedAttribute("class", "insertLabel");
    label3.addExpectedChild(new TextContent("Label 3"));
    body.addExpectedChild(label3);

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

    Tag html = new Tag("html");
    Tag head = new Tag("head");
    html.addExpectedChild(head);
    Tag title = new Tag("title");
    head.addExpectedChild(title);
    title.addExpectedChild(new TextContent("Paged Table Page"));
    Tag body = new Tag("body");
    html.addExpectedChild(body);

    Tag ulTable = new Tag("ul");
    ulTable.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new TextContent(
      "one"))));
    ulTable.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new TextContent(
      "two"))));
    // note that we DO NOT expect the third element as this is not on the current page
    body.addExpectedChild(ulTable);

    Tag ulNav = new Tag("ul");
    ulNav.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new Tag(
      "em").addExpectedChild(new Tag("span").addExpectedChild(new TextContent("1"))))));
    ulNav.addExpectedChild(new Tag("li").addExpectedChild(new Tag("a").addExpectedChild(new Tag(
      "span").addExpectedChild(new TextContent("2")))));

    body.addExpectedChild(ulNav);

    validator.addRootElement(html);
View Full Code Here

    Tag html = new Tag("html");
    Tag head = new Tag("head");
    html.addExpectedChild(head);
    Tag title = new Tag("title");
    head.addExpectedChild(title);
    title.addExpectedChild(new TextContent("Attribute Modifier Test Page"));
    Tag body = new Tag("body");
    html.addExpectedChild(body);

    Tag label1 = new Tag("span");
    label1.addExpectedAttribute("class", "label");
    label1.addExpectedChild(new TextContent("Label 1"));
    body.addExpectedChild(label1);

    Tag label2 = new Tag("span");
    label2.addExpectedAttribute("class", "overrideLabel");
    label2.addExpectedChild(new TextContent("Label 2"));
    body.addExpectedChild(label2);

    Tag label3 = new Tag("span");
    label3.addExpectedAttribute("class", "insertLabel");
    label3.addExpectedChild(new TextContent("Label 3"));
    body.addExpectedChild(label3);

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

  {
    HtmlDocumentValidator validator = new HtmlDocumentValidator();
    Tag html = new Tag("html");
    Tag body = new Tag("body");
    html.addExpectedChild(body);
    body.addExpectedChild(new TextContent("\\s+"));
    Tag span = new Tag("span");
    body.addExpectedChild(span);
    Tag wicket = new Tag("wicket:panel");
    span.addExpectedChild(wicket);

    wicket.addExpectedChild(new TextContent("\\s*Panel Content"));

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

  private boolean validatePage2(String document)
  {
    HtmlDocumentValidator validator = new HtmlDocumentValidator();
    Tag html = new Tag("html");
    Tag body = new Tag("body");
    body.addExpectedChild(new TextContent("\\s+"));
    html.addExpectedChild(body);
    Tag span = new Tag("span");
    body.addExpectedChild(span);

    span.addExpectedChild(new TextContent("\\s*Panel Content"));

    validator.addRootElement(html);
    return validator.isDocumentValid(document);
  }
View Full Code Here

    Tag html = new Tag("html");
    Tag head = new Tag("head");
    html.addExpectedChild(head);
    Tag title = new Tag("title");
    head.addExpectedChild(title);
    title.addExpectedChild(new TextContent("Paged Table Page"));
    Tag body = new Tag("body");
    html.addExpectedChild(body);

    Tag ulTable = new Tag("ul");
    ulTable.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new TextContent(
      "one"))));
    ulTable.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new TextContent(
      "two"))));
    // note that we DO NOT expect the third element as this is not on the current page
    body.addExpectedChild(ulTable);

    Tag ulNav = new Tag("ul");
    ulNav.addExpectedChild(new Tag("li").addExpectedChild(new Tag("span").addExpectedChild(new Tag(
      "em").addExpectedChild(new Tag("span").addExpectedChild(new TextContent("1"))))));
    ulNav.addExpectedChild(new Tag("li").addExpectedChild(new Tag("a").addExpectedChild(new Tag(
      "span").addExpectedChild(new TextContent("2")))));

    body.addExpectedChild(ulNav);

    validator.addRootElement(html);
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.documentvalidation.TextContent

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.