public class ComponentTraversalUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> ArrayList<T> |
children(Class<T> type,
javax.faces.component.UIComponent base) |
static <T> T |
closest(Class<T> type,
javax.faces.component.UIComponent base) |
static javax.faces.component.UIForm |
closestForm(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component) |
static javax.faces.component.UIComponent |
closestNamingContainer(javax.faces.component.UIComponent component) |
static javax.faces.component.UniqueIdVendor |
closestUniqueIdVendor(javax.faces.component.UIComponent component) |
static <T> T |
first(Class<T> type,
javax.faces.component.UIComponent base) |
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.
|
static javax.faces.component.UIComponent |
firstWithId(String id,
javax.faces.component.UIComponent base)
Finds the first component with the given id (NOT clientId!).
|
static void |
withId(String id,
javax.faces.component.UIComponent base,
List<javax.faces.component.UIComponent> components) |
public static <T> T closest(Class<T> type, javax.faces.component.UIComponent base)
public static <T> T first(Class<T> type, javax.faces.component.UIComponent base)
public static <T> ArrayList<T> children(Class<T> type, javax.faces.component.UIComponent base)
public static void withId(String id, javax.faces.component.UIComponent base, List<javax.faces.component.UIComponent> components)
public static javax.faces.component.UIComponent firstWithId(String id, javax.faces.component.UIComponent base)
id
- The id.base
- The base component to start the traversal.public static void firstById(String id, javax.faces.component.UIComponent base, char separatorChar, javax.faces.context.FacesContext context, javax.faces.component.ContextCallback callback)
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 componentpublic static javax.faces.component.UIForm closestForm(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
public static javax.faces.component.UniqueIdVendor closestUniqueIdVendor(javax.faces.component.UIComponent component)
public static javax.faces.component.UIComponent closestNamingContainer(javax.faces.component.UIComponent component)
Copyright © 2019. All rights reserved.