public interface MarkupWriter
This is useful when you want to define the markup but do not
have the Writer yet.
Often this is the case when:
MarkupWriters.
private HtmlWriter createInput(final String name, final String value) {
return new HtmlWriter() {
protected void build() {
input().name(name).value(value).end();
}
};
}
private HtmlWriter createForm(final HtmlWriter ... inputs) {
return new HtmlWriter() {
protected void build() {
form().write(inputs).end();
}
};
}
See MarkupBuilder.write(MarkupWriter...)
HtmlWriter,
MarkupBuilder.write(MarkupWriter...)| Modifier and Type | Method and Description |
|---|---|
<W extends Writer> |
write(W writer)
Writes using the given writer.
|
<W extends Writer> W write(W writer)
W - writer type.writer - not null.Copyright © 2010–2025 JATL. All rights reserved.