Class Checkbox
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.Div
io.mindspice.simplypages.components.forms.Checkbox
- All Implemented Interfaces:
Component
Checkbox wrapper with optional label.
Mutable and not thread-safe. Builder-style methods update the same input/label state. 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 TypeMethodDescriptionchecked()Marks checkbox as checked.static CheckboxCreates a checkbox control.disabled()Marks checkbox as disabled.Renders checkbox input first, optional label second, then inherited children.getId()Returns the currently assigned id value.required()Marks checkbox as required.Sets checkbox input id.Creates and attaches a label linked to this checkbox.Methods inherited from class Div
withAttribute, withChild, withClassMethods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withInnerText, withInnerText, withMaxWidth, withMinWidth, withUnsafeHtml, withWidth
-
Constructor Details
-
Checkbox
-
-
Method Details
-
create
-
withId
-
getId
-
withLabel
-
checked
-
required
-
disabled
-
getChildrenStream
Renders checkbox input first, optional label second, then inherited children.- Overrides:
getChildrenStreamin classHtmlTag- Returns:
- child stream
-