Class FormGroup
java.lang.Object
org.patternfly.component.SubComponent<HTMLElement, FormGroup>
org.patternfly.component.form.FormGroup
- All Implemented Interfaces:
ElementAttributeMethods<HTMLElement, FormGroup>, ElementClassListMethods<HTMLElement, FormGroup>, ElementConsumerMethods<HTMLElement, FormGroup>, ElementContainerMethods<HTMLElement, FormGroup>, ElementEventMethods<HTMLElement, FormGroup>, ElementIdMethods<HTMLElement, FormGroup>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, FormGroup>, HTMLElementDataMethods<HTMLElement, FormGroup>, HTMLElementStyleMethods<HTMLElement, FormGroup>, HTMLElementVisibilityMethods<HTMLElement, FormGroup>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, FormGroup>, HasIdentifier<HTMLElement, FormGroup>, ComponentContext<HTMLElement, FormGroup>
public class FormGroup
extends SubComponent<HTMLElement, FormGroup>
implements HasIdentifier<HTMLElement, FormGroup>, ComponentContext<HTMLElement, FormGroup>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddControl(FormGroupControl control) addLabel(FormGroupLabel label) static FormGroupstatic FormGroup<T> TRetrieves the value associated with the given key from the ComponentContext.booleanDetermines whether a value is stored with the specified key.Retrieves the identifier associated with this component.required()required(boolean required) role(FormGroupRole role) Sets the role of the form group.<T> FormGroupStores a value associated with a key.that()Methods inherited from class SubComponent
element, registerSubComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ComponentContext
get, getMethods 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
hidden
-
Field Details
-
SUB_COMPONENT_NAME
- See Also:
-
-
Method Details
-
formGroup
-
formGroup
-
addLabel
-
addControl
-
required
-
required
-
role
Sets the role of the form group. Pass inFormGroupRole.radiogroupwhen the form group contains multiple radio inputs, or pass inFormGroupRole.groupwhen the form group contains multiple of any other input type (e.g. checkboxes).Please note that if you set a role, the internal structure of the
FormGroupLabelchanges. Without a role the label contains a<label>element. With a role the<label>element is replaced by a<span>element. In this case it is expected that theFormGroupControlcontains label elements. -
store
Description copied from interface:ComponentContextStores a value associated with a key.- Specified by:
storein interfaceComponentContext<HTMLElement, FormGroup>- Type Parameters:
T- the type of the value being stored- Parameters:
key- the key associated with the valuevalue- the value to be stored
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, FormGroup>
-
identifier
Description copied from interface:HasIdentifierRetrieves the identifier associated with this component.- Specified by:
identifierin interfaceHasIdentifier<HTMLElement, FormGroup>- Returns:
- the identifier of the component
-
has
Description copied from interface:ComponentContextDetermines whether a value is stored with the specified key.- Specified by:
hasin interfaceComponentContext<HTMLElement, FormGroup>- Parameters:
key- the key to check- Returns:
- true if a value is stored with the specified key, false otherwise
-
get
Description copied from interface:ComponentContextRetrieves the value associated with the given key from the ComponentContext.- Specified by:
getin interfaceComponentContext<HTMLElement, FormGroup>- Type Parameters:
T- the type of the value being retrieved- Parameters:
key- the key associated with the value- Returns:
- the value associated with the key, or null if no value is found
-