Package org.primefaces.util
Class ComponentTraversalUtils
java.lang.Object
org.primefaces.util.ComponentTraversalUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>static <T> Tstatic <T> Tstatic javax.faces.component.UIFormclosestForm(javax.faces.component.UIComponent component) static javax.faces.component.UIFormclosestForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Deprecated.use closestForm(UIComponent component)static javax.faces.component.UIComponentclosestNamingContainer(javax.faces.component.UIComponent component) static javax.faces.component.UniqueIdVendorclosestUniqueIdVendor(javax.faces.component.UIComponent component) static <T> Tstatic voidfirstById(String id, javax.faces.component.UIComponent base, char separatorChar, javax.faces.context.FacesContext context, javax.faces.component.ContextCallback callback) Finds the first component by the given id expression or client id.static <T> TfirstChildRendered(Class<T> childType, javax.faces.component.UIComponent base) static javax.faces.component.UIComponentfirstWithId(String id, javax.faces.component.UIComponent base) Finds the first component with the given id (NOT clientId!).static voidwithId(String id, javax.faces.component.UIComponent base, List<javax.faces.component.UIComponent> components)
-
Method Details
-
closest
-
closest
public static <T> T closest(Class<T> type, javax.faces.component.UIComponent base, boolean considerBase) -
first
-
children
-
withId
-
firstWithId
public static javax.faces.component.UIComponent firstWithId(String id, javax.faces.component.UIComponent base) Finds the first component with the given id (NOT clientId!). Also used by p:resolveFirstComponentWithId.- Parameters:
id- The id.base- The base component to start the traversal.- Returns:
- The component or null.
-
firstById
public static void firstById(String id, javax.faces.component.UIComponent base, char separatorChar, javax.faces.context.FacesContext context, javax.faces.component.ContextCallback callback) Finds the first component by the given id expression or client id.- Parameters:
id- The id.base- The base component to start the traversal.separatorChar- The separatorChar (e.g. :).context- The FacesContext.callback- the callback for the found component
-
closestForm
@Deprecated public static javax.faces.component.UIForm closestForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) Deprecated.use closestForm(UIComponent component) -
closestForm
public static javax.faces.component.UIForm closestForm(javax.faces.component.UIComponent component) -
closestUniqueIdVendor
public static javax.faces.component.UniqueIdVendor closestUniqueIdVendor(javax.faces.component.UIComponent component) -
closestNamingContainer
public static javax.faces.component.UIComponent closestNamingContainer(javax.faces.component.UIComponent component) -
firstChildRendered
-