Class Select
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.forms.Select
- All Implemented Interfaces:
Component
Select/dropdown control with mutable option list.
Mutable and not thread-safe. Options and attributes are accumulated on this instance. 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 TypeMethodDescriptionAppends one unselected option.Appends one option.addOptions(List<String> values) Appends options where value and label are identical.static SelectCreates a select element.disabled()Marks select disabled.Renders children plus options appended in insertion order.multiple()Enables multi-select behavior.required()Marks select required.Appends class token(s).Sets id attribute.withMaxWidth(String maxWidth) Sets inline max-width style.withMinWidth(String minWidth) Sets inline min-width style.withSize(int size) Sets number of visible options.Sets inline width style.Methods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, render, withAttribute, withChild, withInnerText, withInnerText, withUnsafeHtml
-
Constructor Details
-
Select
-
-
Method Details
-
create
-
withId
-
multiple
-
required
-
disabled
-
withSize
Sets number of visible options.- Parameters:
size- visible row count- Returns:
- this select
-
addOption
-
addOption
-
addOptions
-
withClass
-
getChildrenStream
Renders children plus options appended in insertion order.- Overrides:
getChildrenStreamin classHtmlTag- Returns:
- children stream
-
withWidth
-
withMaxWidth
Sets inline max-width style.- Overrides:
withMaxWidthin classHtmlTag- Parameters:
maxWidth- CSS max-width value- Returns:
- this select
-
withMinWidth
Sets inline min-width style.- Overrides:
withMinWidthin classHtmlTag- Parameters:
minWidth- CSS min-width value- Returns:
- this select
-