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,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>,org.patternfly.style.Modifiers.Disabled<HTMLElement,,FormSelect> org.patternfly.style.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(org.patternfly.handler.ChangeHandler<FormSelect, String> changeHandler) Defines a change handler that is called when thevalue()of this select changes.required(boolean required) Returns the underlying input elementvoidvoidselectFirstValue(boolean fireEvent) that()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.ElementAttributeMethods
aria, aria, aria, attr, attr, attr, role, roleMethods inherited from interface org.jboss.elemento.ElementClassListMethods
classList, classList, css, toggle, toggle, toggleMethods inherited from interface org.jboss.elemento.ElementConsumerMethods
apply, runMethods inherited from interface org.jboss.elemento.ElementContainerMethods
add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.ElementEventMethods
on, on, onMethods inherited from interface org.jboss.elemento.ElementIdMethods
id, uniqueIdMethods inherited from interface org.jboss.elemento.ElementQueryMethods
closest, querySelector, querySelectorAllMethods inherited from interface org.jboss.elemento.HTMLElementAttributeMethods
titleMethods inherited from interface org.jboss.elemento.HTMLElementDataMethods
dataMethods inherited from interface org.jboss.elemento.HTMLElementStyleMethods
style, style, style, style, style, styleMethods inherited from interface org.jboss.elemento.HTMLElementVisibilityMethods
hiddenMethods 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
-
applyTo
Provides access to the underlying select element using a fluent API style -
addGroups
-
addGroup
-
add
-
addOptions
-
addOption
-
add
-
required
- Specified by:
requiredin interfaceorg.patternfly.style.Modifiers.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
-