HtmlDocSerializer

{@link oaj.html.HtmlDocSerializer} is an extension of {@link oaj.html.HtmlSerializer} that wraps serialized POJOs in a complete HTML document.

- {@link oaj.html.HtmlDocSerializer}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_aside HTMLDOC_aside}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_footer HTMLDOC_footer}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_head HTMLDOC_head}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_header HTMLDOC_header}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_nav HTMLDOC_nav}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_navlinks HTMLDOC_navlinks}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_noResultsMessage HTMLDOC_noResultsMessage}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_nowrap HTMLDOC_nowrap}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_script HTMLDOC_script}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_style HTMLDOC_style}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_stylesheet HTMLDOC_stylesheet}
  - {@link oaj.html.HtmlDocSerializer#HTMLDOC_template HTMLDOC_template}

This class is used extensively in the creation of POJO-based user interfaces in the REST API.

##### Example:

/** * Sample REST resource that prints out a simple "Hello world!" message. */ @RestResource( path="/helloWorld", htmldoc=@HtmlDoc( navlinks={ "up: request:/..", "options: servlet:/?method=OPTIONS" }, aside={ "<div style='max-width:400px' class='text'>", " <p>This page shows a resource that simply response with a 'Hello world!' message</p>", " <p>The POJO serialized is a simple String.</p>", "</div>" } ) ) public class HelloWorldResource extends BasicRestServlet {...}

The {@link oaj.html.HtmlDocSerializer#HTMLDOC_template HTMLDOC_template} setting defines a template for the HTML page being generated. The default template is described next.