{title:'@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.

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 ...>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