public static TimelineUpdater getCurrentInstance(String expression) {
        FacesContext context = FacesContext.getCurrentInstance();

        @SuppressWarnings("unchecked")
        Map<String, TimelineUpdater> map = (Map<String, TimelineUpdater>) context.getAttributes().get(TimelineUpdater.class.getName());
        if (map == null) {
            return null;
        }

        AtomicReference<String> widgetVar = new AtomicReference<>();

        SearchExpressionContext sec = SearchExpressionContext.createSearchExpressionContext(context,
                context.getViewRoot(), EnumSet.of(SearchExpressionHint.RESOLVE_SINGLE_COMPONENT), null);
        context.getApplication().getSearchExpressionHandler().resolveComponent(
                sec,
                expression,
                (ctx, target) -> {
                    Timeline timeline = (Timeline) target;
                    widgetVar.set(timeline.resolveWidgetVar(context));
                });

        return map.get(widgetVar.get());
    }
Gets the current thread-safe TimelineUpdater instance.

@param expression The expression to find the Timeline instance.
@return TimelineUpdater instance.
@throws jakarta.faces.component.search.ComponentNotFoundException if the Timeline component can not be found by the given expression.
primefaces/src/main/java/org/primefaces/component/timeline/TimelineUpdater.java