Package htmlflow

Class HtmlView<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>
    Direct Known Subclasses:
    DynamicHtml, StaticHtml

    public abstract class HtmlView<T>
    extends java.lang.Object
    implements HtmlWriter<T>, org.xmlet.htmlapifaster.Element<HtmlView,​org.xmlet.htmlapifaster.Element>
    The root container for HTML elements. It it responsible for managing the org.xmlet.htmlapi.ElementVisitor implementation, which is responsible for printing the tree of elements and attributes.
    Author:
    Miguel Gamboa, Luís Duare created on 29-03-2012
    • Constructor Detail

      • HtmlView

        public HtmlView()
    • Method Detail

      • html

        public org.xmlet.htmlapifaster.Html<HtmlView> html()
      • div

        public org.xmlet.htmlapifaster.Div<HtmlView> div()
      • tr

        public org.xmlet.htmlapifaster.Tr<HtmlView> tr()
      • defineRoot

        public org.xmlet.htmlapifaster.Root<HtmlView> defineRoot()
      • self

        public HtmlView<T> self()
        Specified by:
        self in interface org.xmlet.htmlapifaster.Element<HtmlView,​org.xmlet.htmlapifaster.Element>
      • threadSafe

        public HtmlView<T> threadSafe()
      • getVisitor

        public HtmlVisitorCache getVisitor()
        Specified by:
        getVisitor in interface org.xmlet.htmlapifaster.Element<HtmlView,​org.xmlet.htmlapifaster.Element>
      • setVisitor

        public void setVisitor​(java.util.function.Supplier<HtmlVisitorCache> visitor)
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.xmlet.htmlapifaster.Element<HtmlView,​org.xmlet.htmlapifaster.Element>
      • __

        public org.xmlet.htmlapifaster.Element __()
        Specified by:
        __ in interface org.xmlet.htmlapifaster.Element<HtmlView,​org.xmlet.htmlapifaster.Element>
      • getParent

        public org.xmlet.htmlapifaster.Element getParent()
        Specified by:
        getParent in interface org.xmlet.htmlapifaster.Element<HtmlView,​org.xmlet.htmlapifaster.Element>
      • addPartial

        public final <U> void addPartial​(HtmlView<U> partial,
                                         U model)
        Adds a partial view to this view.
        Type Parameters:
        U - the type of the domain model of the partial view.
        Parameters:
        partial - inner view.
        model - the domain object bound to the partial view.
      • addPartial

        public final <U> void addPartial​(HtmlView<U> partial)
        Adds a partial view to this view.
        Type Parameters:
        U - the type of the domain model of the partial view.
        Parameters:
        partial - inner view.