Class Finder
- All Implemented Interfaces:
Iterable<FinderColumn>, Attachable, ElementAttributeMethods<HTMLElement, Finder>, ElementClassListMethods<HTMLElement, Finder>, ElementConsumerMethods<HTMLElement, Finder>, ElementContainerMethods<HTMLElement, Finder>, ElementEventMethods<HTMLElement, Finder>, ElementIdMethods<HTMLElement, Finder>, ElementQueryMethods<HTMLElement>, HTMLElementAttributeMethods<HTMLElement, Finder>, HTMLElementDataMethods<HTMLElement, Finder>, HTMLElementStyleMethods<HTMLElement, Finder>, HTMLElementVisibilityMethods<HTMLElement, Finder>, IsElement<HTMLElement>, TypedBuilder<HTMLElement, Finder>, org.patternfly.component.Component, org.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>, org.patternfly.core.OuiaSupport<HTMLElement, Finder>, org.patternfly.style.Modifiers.Bordered<HTMLElement, Finder>
-
Method Summary
Modifier and TypeMethodDescriptionReturns the selection path up to and including the currently active (focused) column.add(FinderColumn item) add(FinderPreview preview) Adds the specifiedFinderPreviewinstance to the finder.addColumn(FinderColumn column) Same asHasItems.addItem(HasIdentifier)<T> FinderaddColumns(Iterable<T> items, Function<T, FinderColumn> display) Same asHasItems.addItems(Iterable, Function)addPreview(FinderPreview preview) Adds the specifiedFinderPreviewinstance to the finder.voidattach(MutationRecord mutationRecord) voidclear()booleanvoiddetach(MutationRecord mutationRecord) static Finderfinder()booleanisEmpty()iterator()onAdd(org.patternfly.component.AddItemHandler<Finder, FinderColumn> onAdd) onRemove(org.patternfly.component.RemoveItemHandler<Finder, FinderColumn> onRemove) onUpdate(org.patternfly.component.UpdateItemHandler<Finder, FinderColumn> onUpdate) path()Returns the full selection path across all columns, regardless of which column is currently active.voidremoveItem(String identifier) Parses and selects items along the given finder path string, handling async column loading at each level.select(FinderPath path) Selects items along the given finder path, handling async column loading at each level.intsize()that()voidupdateItem(FinderColumn item) Methods inherited from class org.patternfly.component.BaseComponent
componentType, element, ouiaComponentType, registerComponentMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 org.patternfly.component.HasItems
addItem, addItems, items, replaceItemElement, updateItem, updateItemMethods inherited from interface HTMLElementAttributeMethods
titleMethods inherited from interface HTMLElementDataMethods
data, dataMethods inherited from interface HTMLElementVisibilityMethods
hiddenMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface org.patternfly.style.Modifiers.Bordered
bordered, borderedMethods inherited from interface org.patternfly.core.OuiaSupport
initOuia, initOuia, ouiaId, ouiaSafe, ouiaTransition
-
Method Details
-
finder
-
attach
- Specified by:
attachin interfaceAttachable
-
detach
- Specified by:
detachin interfaceAttachable
-
addColumns
Same asHasItems.addItems(Iterable, Function) -
addColumn
Same asHasItems.addItem(HasIdentifier) -
add
- Specified by:
addin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
addPreview
Adds the specifiedFinderPreviewinstance to the finder. This method ensures that any previously added preview is safely removed before adding the new one.- Parameters:
preview- theFinderPreviewinstance to add. Represents the preview component to be added to the finder.- Returns:
- the current
Finderinstance, allowing for method chaining.
-
add
Adds the specifiedFinderPreviewinstance to the finder. This method ensures that any previously added preview is safely removed before adding the new one.Preview can be managed on a column basis by using
FinderColumn.onPreview(PreviewHandler)or on an item basis by usingFinderItem.onPreview(PreviewHandler).- Parameters:
preview- theFinderPreviewinstance to add. Represents the preview component to be added to the finder.- Returns:
- the current
Finderinstance, allowing for method chaining.
-
that
- Specified by:
thatin interfaceTypedBuilder<HTMLElement, Finder>
-
onAdd
- Specified by:
onAddin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
onUpdate
- Specified by:
onUpdatein interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
onRemove
- Specified by:
onRemovein interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
path
Returns the full selection path across all columns, regardless of which column is currently active. The path includes a segment for every column that has a selected item, stopping at the first column without a selection.Use this method when you need the complete selection state of the finder. If you need the path only up to the currently active (focused) column — for example to synchronise the browser URL during keyboard navigation — use
activePath()instead.- See Also:
-
activePath
Returns the selection path up to and including the currently active (focused) column. Columns to the right of the active column are excluded even if they still have selected items. This is useful for synchronising the browser URL during arrow-left keyboard navigation, where columns to the right are preserved in the DOM but should no longer be reflected in the URL.When no arrow-left navigation has occurred, the active column is the deepest column with a selection, so this method returns the same result as
path().- See Also:
-
select
Parses and selects items along the given finder path string, handling async column loading at each level. The path must use the format produced byFinderPath.toString():col1=item1/col2=item2/col3. The last segment may omit the item identifier to represent a column with no selected item.- Parameters:
path- the encoded finder path string- Returns:
- a
Promisethat resolves with theResolvedFinderPathof successfully selected items - See Also:
-
select
Selects items along the given finder path, handling async column loading at each level. The first column in the path must already be present in this finder. Each item selection may trigger creation and async loading of the next column (viaFinderItem.nextColumn(java.util.function.Supplier)).Select and preview events are fired only for the deepest successfully resolved item, not for intermediate segments. If a segment cannot be resolved (column not found, item not found after loading), the promise resolves with a partial
ResolvedFinderPathcontaining only the successfully selected segments, and events are fired for the last resolved item.- Parameters:
path- the finder path to select- Returns:
- a
Promisethat resolves with theResolvedFinderPathof successfully selected items
-
iterator
- Specified by:
iteratorin interfaceIterable<FinderColumn>
-
size
public int size()- Specified by:
sizein interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
contains
- Specified by:
containsin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
item
- Specified by:
itemin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
updateItem
- Specified by:
updateItemin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
removeItem
- Specified by:
removeItemin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-
clear
public void clear()- Specified by:
clearin interfaceorg.patternfly.component.HasItems<HTMLElement, Finder, FinderColumn>
-