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, ElementAttributeMethods<HTMLElement, FormSelect>, ElementClassListMethods<HTMLElement, FormSelect>, ElementConsumerMethods<HTMLElement, FormSelect>, ElementContainerMethods<HTMLElement, FormSelect>, ElementEventMethods<HTMLElement, FormSelect>, ElementIdMethods<HTMLElement, FormSelect>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, FormSelect>, HTMLElementDataMethods<HTMLElement, FormSelect>, HTMLElementStyleMethods<HTMLElement, FormSelect>, HTMLElementVisibilityMethods<HTMLElement, FormSelect>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, FormSelect>, Component, HasValue<String>, Validatable<HTMLElement, FormSelect>, 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> FormSelectaddGroups(Iterable<T> items, Function<T, FormSelectOptionGroup> display) addOption(FormSelectOption option) <T> FormSelectaddOptions(Iterable<T> items, Function<T, FormSelectOption> display) Provides access to the underlying select element using a fluent API stylevoidattach(MutationRecord mutationRecord) booleancontainsValue(String value) 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) Adds/removes modifier(required)Returns the underlying input elementvoidvoidselectFirstValue(boolean fireEvent) that()value()Same as value(String, false)Methods inherited from class FormControl
disabled, resetValidation, validatedMethods inherited from class BaseComponent
componentType, element, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Attachable
detachMethods inherited from interface ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface ElementConsumerMethods
apply, runMethods inherited from interface ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface ElementEventMethods
on, on, onMethods inherited from interface ElementIdMethods
id, uniqueIdMethods inherited from interface ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Modifiers.Disabled
disabled, isDisabledMethods inherited from interface Modifiers.Required
required
-
Method Details
-
formSelect
-
formSelect
-
attach
- Specified by:
attachin interfaceAttachable
-
applyTo
Provides access to the underlying select element using a fluent API style -
addGroups
-
addGroup
-
add
-
addOptions
-
addOption
-
add
-
required
Description copied from interface:Modifiers.RequiredAdds/removes modifier(required)- Specified by:
requiredin interfaceModifiers.Required<HTMLElement, FormSelect>
-
value
Same as value(String, false) -
value
-
selectFirstValue
public void selectFirstValue() -
selectFirstValue
public void selectFirstValue(boolean fireEvent) -
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
-
containsValue
-
selectElement
Returns the underlying input element
-