java.lang.Object
org.omnifaces.util.Components.ForEach
- Enclosing class:
- Components
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromRoot(UIComponent root) The root component where tree visiting startsprotected FacesContextgetHints()protected Collection<String>getIds()protected UIComponentgetRoot()The IDs of the components that are to be visitedhavingIds(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>
voidInvokes the given operation on the components as specified by the query parameters set via this builder.final Components.ForEachThe types of the components that are to be visitedThe VisitHints that are used for the visit.The VisitHints that are used for the visit.
-
Constructor Details
-
ForEach
public ForEach() -
ForEach
-
-
Method Details
-
fromRoot
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
-
havingIds
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
-
havingIds
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
-
withHints
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
-
withHints
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
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
-
invoke
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- WhenCis of wrong type.
-
invoke
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
-
getFacesContext
-
getRoot
-
getIds
-
getHints
-