TextArea extends AbstractHtml { public String getChildText() { final List<AbstractHtml> children = getChildren(); if (children.size() > 0) { final StringBuilder builder = new StringBuilder(); for (final AbstractHtml child : children) { builder.append(child.toHtmlString()); } return builder.toString(); } return ""; } TextArea(final AbstractHtml base,
            final AbstractAttribute... attributes); void setChildText(final String text); void setChildText(final boolean updateClient, final String text); String getChildText();  }
@Test public void testGetChildText() { TextArea textArea = new TextArea(null) { { new NoTag(this, "one"); new Div(this) { { new NoTag(this, "two"); } }; new NoTag(this, "three"); } }; assertEquals("one<div>two</div>three", textArea.getChildText()); assertEquals("<textarea>one<div>two</div>three</textarea>", textArea.toHtmlString()); assertEquals("", new TextArea(null).getChildText()); }