@Html Annotation

The {@link oaj.html.annotation.Html @Html} annotation can be used to customize how POJOs are serialized to HTML on a per-class/field/method basis.

- {@link oaj.html.annotation.Html}
  - {@link oaj.html.annotation.Html#anchorText() anchorText}
  - {@link oaj.html.annotation.Html#format() format}
  - {@link oaj.html.annotation.Html#link() link}
  - {@link oaj.html.annotation.Html#noTableHeaders() noTableHeaders}
  - {@link oaj.html.annotation.Html#noTables() noTables}
  - {@link oaj.html.annotation.Html#render() render}

The {@link oaj.html.annotation.Html#link @Html(link)} annotation adds a hyperlink to a bean property when rendered as HTML.

##### Example:

public class FileSpace { // Add a hyperlink to this bean property. @Html(link="servlet:/drive/{drive}") public String getDrive() {...} }

The {@link oaj.html.annotation.Html#anchorText @Html(anchorText)} annotation is used to specify the anchor text of a hyperlink.

##### Example:

// Produces <a href='...'>CLICK ME!</a> when serialized to HTML. public class FileSpace { // Add a hyperlink to this bean property. @Html(link="servlet:/drive/{drive}", anchorText="CLICK ME!") public String getDrive() {...} }

The {@link oaj.html.annotation.Html#format @Html(format)} annotation is used to specify what format to use for HTML elements. For example, the HTML beans defined in the {@link oaj.dto.html5} package use format=XML so that the beans get serialized as standard XML:

##### Example:

// Parent class of all HTML DTO beans. @Html(format=XML) public abstract class HtmlElement {...}

The {@link oaj.html.annotation.Html#noTableHeaders @Html(noTableHeaders)} annotation is used to prevent beans from being serialized with table headers.

The {@link oaj.html.annotation.Html#noTables @Html(noTables)} annotation is used to force beans to be serialized as trees instead of tables