Class Div
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.Div
- All Implemented Interfaces:
Component
- Direct Known Subclasses:
Checkbox, EditableModule, RadioGroup
Minimal fluent wrapper around an HTML
div.
Mutable and not thread-safe. Each mutator updates this instance in place. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.
-
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwithAttribute(String name, String value) Sets or replaces an attribute.Appends a child component.Adds class token(s) without replacing previously assigned classes.Sets id attribute.Methods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getChildrenStream, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withInnerText, withInnerText, withMaxWidth, withMinWidth, withUnsafeHtml, withWidth
-
Constructor Details
-
Div
public Div()Creates an empty div.
-
-
Method Details
-
withClass
-
withId
-
withAttribute
Sets or replaces an attribute.- Overrides:
withAttributein classHtmlTag- Parameters:
name- attribute namevalue- attribute value- Returns:
- this div
-
withChild
-