Class Button
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.forms.Button
- All Implemented Interfaces:
Component
Form/button control with type, style, and size helpers.
Mutable and not thread-safe. Attribute and class mutators update 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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Buttondisabled()large()static Buttonsmall()static ButtonAlias forHtmlTag.addClass(String).Sets element id, or removes it when null.withMaxWidth(String maxWidth) Sets inlinemax-widthafter restricted CSS token validation.withMinWidth(String minWidth) Sets inlinemin-widthafter restricted CSS token validation.withOnClick(String onClick) withStyle(Button.ButtonStyle style) withType(Button.ButtonType type) Sets inlinewidthafter restricted CSS token validation.Methods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getChildrenStream, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withAttribute, withChild, withInnerText, withInnerText, withUnsafeHtml
-
Constructor Details
-
Button
-
-
Method Details
-
create
-
submit
-
reset
-
withType
-
withStyle
-
withId
-
disabled
-
withClass
-
withOnClick
-
fullWidth
-
large
-
small
-
withWidth
-
withMaxWidth
Description copied from class:HtmlTagSets inlinemax-widthafter restricted CSS token validation.- Overrides:
withMaxWidthin classHtmlTag
-
withMinWidth
Description copied from class:HtmlTagSets inlinemin-widthafter restricted CSS token validation.- Overrides:
withMinWidthin classHtmlTag
-