Package htmlflow
Class DynamicHtml<T>
- java.lang.Object
-
- htmlflow.HtmlView<T>
-
- htmlflow.DynamicHtml<T>
-
- Type Parameters:
T
- The type of domain object bound to this View.
- All Implemented Interfaces:
HtmlWriter<T>
,org.xmlet.htmlapifaster.Element<HtmlView,org.xmlet.htmlapifaster.Element>
public class DynamicHtml<T> extends HtmlView<T>
Dynamic views can be bound to a domain object.- Author:
- Miguel Gamboa, Luís Duare
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
render()
Returns a new String with the HTML content of this view.java.lang.String
render(T model)
Returns a new String with the HTML content of this view.java.lang.String
render(T model, HtmlView... partials)
static <U> DynamicHtml<U>
view(HtmlTemplate<U> template)
static <U> DynamicHtml<U>
view(java.io.PrintStream out, HtmlTemplate<U> template)
static <U> DynamicHtml<U>
view(java.io.PrintStream out, java.util.function.BiConsumer<DynamicHtml<U>,U> binder)
static <U> DynamicHtml<U>
view(java.util.function.BiConsumer<DynamicHtml<U>,U> binder)
void
write()
Writes into an internal PrintStream the HTML content.void
write(T model)
Writes into an internal PrintStream the HTML content binding the object model with the HTML elements.void
write(T model, HtmlView... partials)
-
Methods inherited from class htmlflow.HtmlView
__, addPartial, addPartial, defineRoot, div, getName, getParent, getVisitor, html, self, setPrintStream, tr
-
-
-
-
Method Detail
-
view
public static <U> DynamicHtml<U> view(java.io.PrintStream out, HtmlTemplate<U> template)
-
view
public static <U> DynamicHtml<U> view(java.io.PrintStream out, java.util.function.BiConsumer<DynamicHtml<U>,U> binder)
-
view
public static <U> DynamicHtml<U> view(HtmlTemplate<U> template)
-
view
public static <U> DynamicHtml<U> view(java.util.function.BiConsumer<DynamicHtml<U>,U> binder)
-
render
public java.lang.String render()
Description copied from interface:HtmlWriter
Returns a new String with the HTML content of this view.
-
render
public java.lang.String render(T model)
Description copied from interface:HtmlWriter
Returns a new String with the HTML content of this view.- Parameters:
model
- An object model that could be bind to each element of the view.
-
write
public void write()
Description copied from interface:HtmlWriter
Writes into an internal PrintStream the HTML content.
-
write
public void write(T model)
Description copied from interface:HtmlWriter
Writes into an internal PrintStream the HTML content binding the object model with the HTML elements.- Parameters:
model
- An object model that could be bind to each element.
-
-