List<String> finalParams = new ArrayList<String>(3);
if (userEventCode != null && !userEventCode.trim().equals(STR_EMPTY)) {
finalParams.add('\'' + escapeJavaScriptForChain(userEventCode) + '\'');
}
final MyfacesConfig currentInstance = MyfacesConfig
.getCurrentInstance(externalContext);
ScriptContext behaviorCode = new ScriptContext();
ScriptContext retVal = new ScriptContext(currentInstance.isPrettyHtml());
boolean submitting1 = getClientBehaviorScript(facesContext, uiComponent, targetClientId, eventName1, clientBehaviors,
behaviorCode, params);
boolean submitting2 = getClientBehaviorScript(facesContext, uiComponent, targetClientId, eventName2, clientBehaviors,
behaviorCode, params2);