public void focus(String expression, UIComponent base) {
        if (LangUtils.isBlank(expression)) {
            return;
        }

        FacesContext facesContext = getFacesContext();

        String clientId = SearchExpressionUtils.resolveClientId(facesContext,
                base,
                expression);
        executeScript("PrimeFaces.focus('" + clientId + "');");
    }
Resolves the search expression and focus the resolved component.

@param expression the search expression.
@param base the base component from which we will start to resolve the search expression.
primefaces/src/main/java/org/primefaces/PrimeFaces.java