AjaxUpdateLink.addEffect(options, (String) valueForBinding("afterEffect", component), afterEffectID, (String) valueForBinding("afterEffectDuration", component));
// PROTOTYPE EFFECTS
String beforeEffect = (String) valueForBinding("beforeEffect", component);
WOAssociation directActionNameAssociation = (WOAssociation) associations().valueForKey("directActionName");
if (beforeEffect == null && updateContainerID != null && directActionNameAssociation == null && replaceID == null && function == null && onClick == null && onClickBefore == null) {
NSDictionary nonDefaultOptions = AjaxUpdateContainer.removeDefaultOptions(options);
onClickBuffer.append("AUL.");
if (generateFunctionWrapper) {
onClickBuffer.append("updateFunc");
}
else {
onClickBuffer.append("update");
}
onClickBuffer.append("('");
onClickBuffer.append(updateContainerID);
onClickBuffer.append("', ");
AjaxOptions.appendToBuffer(nonDefaultOptions, onClickBuffer, context);
onClickBuffer.append(", '");
onClickBuffer.append(context.contextID());
onClickBuffer.append('.');
onClickBuffer.append(context.elementID());
onClickBuffer.append('\'');
// if (generateFunctionWrapper) {
// onClickBuffer.append(", additionalParams");
// }
onClickBuffer.append(')');
onClickBuffer.append(';');
}
else {
if (generateFunctionWrapper) {
onClickBuffer.append("function(additionalParams) {");
}
if (onClickBefore != null) {
onClickBuffer.append("if (");
onClickBuffer.append(onClickBefore);
onClickBuffer.append(") {");
}
// PROTOTYPE EFFECTS
if (beforeEffect != null) {
onClickBuffer.append("new ");
onClickBuffer.append(AjaxUpdateLink.fullEffectName(beforeEffect));
onClickBuffer.append("('");
String beforeEffectID = (String) valueForBinding("beforeEffectID", component);
if (beforeEffectID == null) {
beforeEffectID = AjaxUpdateContainer.currentUpdateContainerID();
if (beforeEffectID == null) {
beforeEffectID = updateContainerID;
}
}
onClickBuffer.append(beforeEffectID);
onClickBuffer.append("', { ");
String beforeEffectDuration = (String) valueForBinding("beforeEffectDuration", component);
if (beforeEffectDuration != null) {
onClickBuffer.append("duration: ");
onClickBuffer.append(beforeEffectDuration);
onClickBuffer.append(", ");
}
onClickBuffer.append("queue:'end', afterFinish: function() {");
}
String actionUrl = null;
if (directActionNameAssociation != null) {
actionUrl = context._directActionURL((String) directActionNameAssociation.valueInComponent(component), ERXComponentUtilities.queryParametersInComponent(associations(), component), ERXRequest.isRequestSecure(context.request()), 0, false).replaceAll("&", "&");
}
else {
actionUrl = AjaxUtils.ajaxComponentActionUrl(context);
}