public static void firstById(String id, UIComponent base, char separatorChar, FacesContext context, ContextCallback callback) {

        // try #findComponent first
        UIComponent component = base.findComponent(id);

        // try #invokeOnComponent
        // it's required to support e.g. a full client id for a component which is placed inside UIData components
        if (component == null) {
            // #invokeOnComponent doesn't support the leading seperator char
            String tempExpression = id;
            if (tempExpression.charAt(0) == separatorChar) {
                tempExpression = tempExpression.substring(1);
            }

            context.getViewRoot().invokeOnComponent(context, tempExpression, callback);
        }
        else {
            callback.invokeContextCallback(context, component);
        }
    }
Finds the first component by the given id expression or client id.

@param id The id.
@param base The base component to start the traversal.
@param separatorChar The separatorChar (e.g. :).
@param context The FacesContext.
@param callback the callback for the found component
primefaces/src/main/java/org/primefaces/util/ComponentTraversalUtils.java