protected String getSubmitFunction(FacesContext facesContext, UIComponent component) {
if (!isAjaxMode(component)) {
return null;
}
AjaxFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(facesContext, component);
AjaxOptions options = ajaxFunction.getOptions();
options.set("beforedomupdate", BEFORE_UPDATE_HANDLER);
options.set("complete", AFTER_UPDATE_HANDLER);
options.setClientParameters(PARAMS);
return ajaxFunction.toScript();
}