Class Template
The template element represents a template for a fragment of HTML that can be cloned and inserted into the document by script. It is used to define reusable HTML content that can be instantiated multiple times using JavaScript. The template element is not rendered in the document until its content is cloned and inserted into the DOM. It is commonly used for creating dynamic content, such as repeating elements in lists or generating content based on data.
Examples:
The following convenience methods are provided for constructing instances of this bean:
See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.juneau.bean.html5.HtmlElementMixed
child, children, getChild, getChild, getChild, getChildren, setChildrenMethods inherited from class org.apache.juneau.bean.html5.HtmlElement
accesskey, attr, attrUri, class_, contenteditable, deminimize, dir, getAttr, getAttr, getAttrs, hidden, id, lang, onabort, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, oncuechange, ondblclick, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting, self, setAttrs, spellcheck, style, tabindex, title, toString, translate
-
Constructor Details
-
Template
public Template()Creates an emptyTemplateelement. -
Template
Creates aTemplateelement with the specifiedHtmlElement.id(String)attribute and child nodes.- Parameters:
id- TheHtmlElement.id(String)attribute. Can benull to unset the attribute.children- The child nodes. Must not benull .
-