public AjaxRequestBuilder onstart(String onstart) {
        if (onstart != null) {
            buffer.append(",onst:function(cfg){").append(onstart).append(";}");
        }

        return this;
    }
Helper to generate javascript code of an ajax call
primefaces/src/main/java/org/primefaces/util/AjaxRequestBuilder.java