T
- The bean property type.public abstract class HtmlRender<T> extends Object
Associated with bean properties using the @Html.render()
annotation.
Using this class, you can alter the CSS style and HTML content of the bean property.
The following example shows two render classes that customize the appearance of the pctFull
and
status
columns shown below:
Constructor and Description |
---|
HtmlRender() |
Modifier and Type | Method and Description |
---|---|
Object |
getContent(SerializerSession session,
T value)
Returns the delegate value for the specified bean property value.
|
String |
getStyle(SerializerSession session,
T value)
Returns the CSS style of the element containing the bean property value.
|
public HtmlRender()
public String getStyle(SerializerSession session, T value)
session
- The current serializer session.
Can be used to retrieve properties and session-level information.value
- The bean property value.public Object getContent(SerializerSession session, T value)
The default implementation simply returns the same value. A typical use is to return an HTML element using one of the HTML5 DOM beans.
session
- The current serializer session.
Can be used to retrieve properties and session-level information.value
- The bean property value.Copyright © 2018 Apache. All rights reserved.