- java.lang.Object
- 
- org.omnifaces.util.Components.ForEach
 
- 
- Enclosing class:
- Components
 
 public static class Components.ForEach extends Object Builder class used to collect a number of query parameters for a visit (for each) of components in the Faces component tree. The chain of collecting parameters is terminated by calling one of the invoke methods.- Since:
- 2.0
- Author:
- Arjan Tijms
 
- 
- 
Constructor SummaryConstructors Constructor Description ForEach()ForEach(FacesContext facesContext)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Components.ForEachfromRoot(UIComponent root)The root component where tree visiting startsprotected FacesContextgetFacesContext()protected Set<VisitHint>getHints()protected Collection<String>getIds()protected UIComponentgetRoot()Components.ForEachhavingIds(String... ids)The IDs of the components that are to be visitedComponents.ForEachhavingIds(Collection<String> ids)The IDs of the components that are visitedvoidinvoke(VisitCallback operation)Invokes the given operation on the components as specified by the query parameters set via this builder.<C extends UIComponent>
 voidinvoke(Consumer<C> operation)Invokes the given operation on the components as specified by the query parameters set via this builder.Components.ForEachofTypes(Class<?>... types)The types of the components that are to be visitedComponents.ForEachwithHints(VisitHint... hints)The VisitHints that are used for the visit.Components.ForEachwithHints(Set<VisitHint> hints)The VisitHints that are used for the visit.
 
- 
- 
- 
Constructor Detail- 
ForEachpublic ForEach() 
 - 
ForEachpublic ForEach(FacesContext facesContext) 
 
- 
 - 
Method Detail- 
fromRootpublic Components.ForEach fromRoot(UIComponent root) The root component where tree visiting starts- Parameters:
- root- the root component where tree visiting starts
- Returns:
- the intermediate builder object to continue the builder chain
 
 - 
havingIdspublic Components.ForEach havingIds(Collection<String> ids) The IDs of the components that are visited- Parameters:
- ids- the IDs of the components that are visited
- Returns:
- the intermediate builder object to continue the builder chain
 
 - 
havingIdspublic Components.ForEach havingIds(String... ids) The IDs of the components that are to be visited- Parameters:
- ids- the IDs of the components that are to be visited
- Returns:
- the intermediate builder object to continue the builder chain
 
 - 
withHintspublic Components.ForEach withHints(Set<VisitHint> hints) The VisitHints that are used for the visit.- Parameters:
- hints- the VisitHints that are used for the visit.
- Returns:
- the intermediate builder object to continue the builder chain
 
 - 
withHintspublic Components.ForEach withHints(VisitHint... hints) The VisitHints that are used for the visit.- Parameters:
- hints- the VisitHints that are used for the visit.
- Returns:
- the intermediate builder object to continue the builder chain
 
 - 
ofTypes@SafeVarargs public final Components.ForEach ofTypes(Class<?>... types) The types of the components that are to be visited- Parameters:
- types- the types of the components that are to be visited
- Returns:
- the intermediate builder object to continue the builder chain
 
 - 
invokepublic <C extends UIComponent> void invoke(Consumer<C> operation) Invokes the given operation on the components as specified by the query parameters set via this builder.- Type Parameters:
- C- The expected component type.
- Parameters:
- operation- the operation to invoke on each component
- Throws:
- ClassCastException- When- Cis of wrong type.
 
 - 
invokepublic void invoke(VisitCallback operation) Invokes the given operation on the components as specified by the query parameters set via this builder.- Parameters:
- operation- the operation to invoke on each component
 
 - 
getFacesContextprotected FacesContext getFacesContext() 
 - 
getRootprotected UIComponent getRoot() 
 - 
getIdsprotected Collection<String> getIds() 
 
- 
 
-