public static class Components.ForEach extends Object
Constructor and Description |
---|
ForEach() |
ForEach(jakarta.faces.context.FacesContext facesContext) |
Modifier and Type | Method and Description |
---|---|
Components.ForEach |
fromRoot(jakarta.faces.component.UIComponent root)
The root component where tree visiting starts
|
protected jakarta.faces.context.FacesContext |
getFacesContext() |
protected Set<jakarta.faces.component.visit.VisitHint> |
getHints() |
protected Collection<String> |
getIds() |
protected jakarta.faces.component.UIComponent |
getRoot() |
Components.ForEach |
havingIds(Collection<String> ids)
The IDs of the components that are visited
|
Components.ForEach |
havingIds(String... ids)
The IDs of the components that are to be visited
|
<C extends jakarta.faces.component.UIComponent> |
invoke(Consumer<C> operation)
Invokes the given operation on the components as specified by the
query parameters set via this builder.
|
void |
invoke(jakarta.faces.component.visit.VisitCallback operation)
Invokes the given operation on the components as specified by the
query parameters set via this builder.
|
Components.ForEach |
ofTypes(Class<?>... types)
The types of the components that are to be visited
|
Components.ForEach |
withHints(Set<jakarta.faces.component.visit.VisitHint> hints)
The VisitHints that are used for the visit.
|
Components.ForEach |
withHints(jakarta.faces.component.visit.VisitHint... hints)
The VisitHints that are used for the visit.
|
public ForEach()
public ForEach(jakarta.faces.context.FacesContext facesContext)
public Components.ForEach fromRoot(jakarta.faces.component.UIComponent root)
root
- the root component where tree visiting startspublic Components.ForEach havingIds(Collection<String> ids)
ids
- the IDs of the components that are visitedpublic Components.ForEach havingIds(String... ids)
ids
- the IDs of the components that are to be visitedpublic Components.ForEach withHints(Set<jakarta.faces.component.visit.VisitHint> hints)
hints
- the VisitHints that are used for the visit.public Components.ForEach withHints(jakarta.faces.component.visit.VisitHint... hints)
hints
- the VisitHints that are used for the visit.@SafeVarargs public final Components.ForEach ofTypes(Class<?>... types)
types
- the types of the components that are to be visitedpublic <C extends jakarta.faces.component.UIComponent> void invoke(Consumer<C> operation)
C
- The expected component type.operation
- the operation to invoke on each componentClassCastException
- When C
is of wrong type.public void invoke(jakarta.faces.component.visit.VisitCallback operation)
operation
- the operation to invoke on each componentprotected jakarta.faces.context.FacesContext getFacesContext()
protected jakarta.faces.component.UIComponent getRoot()
protected Collection<String> getIds()
protected Set<jakarta.faces.component.visit.VisitHint> getHints()
Copyright © 2012–2020 OmniFaces. All rights reserved.