I am creating a JSF2 Facelets composite component. I would like the HTML to render differently if a particular facet is defined. Is there any way to check if a <f:facet name="..." /> has been defined for a composite component?
I am creating a JSF2 Facelets composite component. I would like the HTML to
Share
Yes, you can use
UIComponent#getFacets()to get a mapping of all facets by their name. So all you need to do is to check if the map value is not empty.