Class ComponentRegistry

java.lang.Object
org.patternfly.component.ComponentRegistry

public class ComponentRegistry extends Object
Public, type-keyed singleton registry for PatternFly components that exist at most once per page. Use this class to register and look up global components such as Page, Masthead, or NotificationDrawerList.

This is distinct from ComponentStore, which is an internal, package-private store for wiring parent-child relationships via DOM traversal and supports multiple instances of the same ComponentType.

Registration is done by calling registerComponent(ComponentType, BaseComponent) or registerSubComponent(ComponentType, String, SubComponent). Lookup is done by calling lookupComponent(ComponentType) and lookupSubComponent(ComponentType, String). When a registered component is removed from the DOM, call unregisterComponent(ComponentType) or unregisterSubComponent(ComponentType, String) to prevent stale references.