Package htmlflow

Class 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 Detail

      • 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​(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.
      • render

        public java.lang.String render​(T model,
                                       HtmlView... partials)
      • 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.
      • write

        public void write​(T model,
                          HtmlView... partials)