function.appendScript(onClick);
onClick.append(";");
JSFunction ajaxFunction = AjaxRendererUtils.buildAjaxFunction(tgComp, context);
ajaxFunction.addParameter(AjaxRendererUtils.buildEventOptions(context, tgComp));
ajaxFunction.appendScript(onClick);
if (tgComp instanceof AjaxSupport) {
AjaxSupport support = (AjaxSupport) tgComp;
if (support.isDisableDefault()) {
onClick.append("; return false;");