Package org.patternfly.component.form
Class FormSelect
java.lang.Object
org.patternfly.component.BaseComponent<E,B>
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.
-
Method Summary
Modifier and TypeMethodDescriptionadd(FormSelectOption option) add(FormSelectOptionGroup group) addGroup(FormSelectOptionGroup group) <T> FormSelectaddGroups(Iterable<T> items, Function<T, FormSelectOptionGroup> display) addOption(FormSelectOption option) <T> FormSelectaddOptions(Iterable<T> items, Function<T, FormSelectOption> display) applyTo(Consumer<HTMLElementBuilder<HTMLSelectElement>> consumer) Provides access to the underlying select element using a fluent API stylevoidattach(MutationRecord mutationRecord) static FormSelectformSelect(String id) static FormSelectformSelect(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, validatedMethods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.Attachable
detachMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueIdMethods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, titleMethods inherited from interface org.patternfly.style.Modifiers.Disabled
disabled, isDisabledMethods inherited from interface org.patternfly.style.Modifiers.Required
required
-
Method Details
-
formSelect
-
formSelect
-
attach
- Specified by:
attachin interfaceAttachable
-
addGroups
-
addGroup
-
add
-
addOptions
-
addOption
-
add
-
required
- Specified by:
requiredin 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:
thatin 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
-