Package htmlflow
Class HtmlView<T>
- java.lang.Object
-
- htmlflow.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 theorg.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 Summary
Constructors Constructor Description HtmlView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xmlet.htmlapifaster.Element
__()
<U> void
addPartial(HtmlView<U> partial)
Adds a partial view to this view.<U> void
addPartial(HtmlView<U> partial, U model)
Adds a partial view to this view.org.xmlet.htmlapifaster.Root<HtmlView>
defineRoot()
org.xmlet.htmlapifaster.Div<HtmlView>
div()
java.lang.String
getName()
org.xmlet.htmlapifaster.Element
getParent()
HtmlVisitorCache
getVisitor()
org.xmlet.htmlapifaster.Html<HtmlView>
html()
HtmlView<T>
self()
HtmlWriter<T>
setPrintStream(java.io.PrintStream out)
Sets the current PrintStream.void
setVisitor(java.util.function.Supplier<HtmlVisitorCache> visitor)
HtmlView<T>
threadSafe()
org.xmlet.htmlapifaster.Tr<HtmlView>
tr()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface htmlflow.HtmlWriter
render, render, write, write
-
-
-
-
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()
-
setPrintStream
public HtmlWriter<T> setPrintStream(java.io.PrintStream out)
Description copied from interface:HtmlWriter
Sets the current PrintStream.- Specified by:
setPrintStream
in interfaceHtmlWriter<T>
-
self
public HtmlView<T> self()
- Specified by:
self
in interfaceorg.xmlet.htmlapifaster.Element<HtmlView,org.xmlet.htmlapifaster.Element>
-
getVisitor
public HtmlVisitorCache getVisitor()
- Specified by:
getVisitor
in interfaceorg.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 interfaceorg.xmlet.htmlapifaster.Element<HtmlView,org.xmlet.htmlapifaster.Element>
-
__
public org.xmlet.htmlapifaster.Element __()
- Specified by:
__
in interfaceorg.xmlet.htmlapifaster.Element<HtmlView,org.xmlet.htmlapifaster.Element>
-
getParent
public org.xmlet.htmlapifaster.Element getParent()
- Specified by:
getParent
in interfaceorg.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.
-
-