Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions api/src/main/java/jakarta/faces/component/UIComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,21 @@ public int getFacetCount() {
*/
public abstract UIComponent getFacet(String name);

/**
* <p>
* Convenience method to return the named facet using an enum identifier, if it exists, or <code>null</code>
* otherwise. This method delegates to {@link #getFacet(String)} using the result of calling
* <code>identifier.toString()</code>. If the requested facet does not exist, the facets Map must not be created.
* </p>
*
* @param identifier Enum identifier of the desired facet
* @return the component, or <code>null</code>.
* @since 5.0
*/
public UIComponent getFacet(Enum<?> identifier) {
return getFacet(identifier.toString());
}

/**
* <p>
* Return an <code>Iterator</code> over the facet followed by child {@link UIComponent}s of this {@link UIComponent}.
Expand Down