Package org.patternfly.component.form
Class FormSelect
java.lang.Object
org.patternfly.component.BaseComponent<HTMLElement,FormSelect>
org.patternfly.component.form.FormControl<HTMLElement,FormSelect>
org.patternfly.component.form.FormSelect
- All Implemented Interfaces:
Attachable
,Container<HTMLElement,
,FormSelect> Finder<HTMLElement>
,HasElement<HTMLElement,
,FormSelect> HasHTMLElement<HTMLElement,
,FormSelect> IsElement<HTMLElement>
,TypedBuilder<HTMLElement,
,FormSelect> Component
,HasValue<String>
,Modifiers.Disabled<HTMLElement,
,FormSelect> Modifiers.Required<HTMLElement,
FormSelect>
public class FormSelect
extends FormControl<HTMLElement,FormSelect>
implements HasValue<String>, Attachable
A form select embeds browser native select lists into a form.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionadd
(FormSelectOption option) add
(FormSelectOptionGroup group) addGroup
(FormSelectOptionGroup group) <T> FormSelect
addGroups
(Iterable<T> items, Function<T, FormSelectOptionGroup> display) addOption
(FormSelectOption option) <T> FormSelect
addOptions
(Iterable<T> items, Function<T, FormSelectOption> display) applyTo
(Consumer<HTMLElementBuilder<HTMLSelectElement>> consumer) Provides access to the underlying select element using a fluent API stylevoid
attach
(MutationRecord mutationRecord) static FormSelect
formSelect
(String id) static FormSelect
formSelect
(String id, String value) onChange
(ChangeHandler<FormSelect, String> changeHandler) Defines a change handler that is called when thevalue()
of this select changes.required
(boolean required) Returns the underlying input elementthat()
value()
Same as value(String, false)Methods inherited from class org.patternfly.component.form.FormControl
disabled, resetValidation, validated
Methods inherited from class org.patternfly.component.BaseComponent
componentType, element
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.elemento.Attachable
detach
Methods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAll
Methods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueId
Methods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, title
Methods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabled
Methods inherited from interface org.patternfly.style.Modifiers.Required
required
-
Method Details
-
formSelect
-
formSelect
-
attach
- Specified by:
attach
in interfaceAttachable
-
addGroups
-
addGroup
-
add
-
addOptions
-
addOption
-
add
-
required
- Specified by:
required
in interfaceModifiers.Required<HTMLElement,
FormSelect>
-
value
Same as value(String, false) -
value
-
applyTo
Provides access to the underlying select element using a fluent API style -
that
- Specified by:
that
in interfaceTypedBuilder<HTMLElement,
FormSelect>
-
onChange
Defines a change handler that is called when thevalue()
of this select changes. Changes are detected by adding an event listener for input event to the select element. -
value
-
selectElement
Returns the underlying input element
-