// Add the task from the onclick script.
Script task = getTaskForEvent(attributes, "onclick",
EventConstants.ON_CLICK);
if (task != null) {
// Append the script into the output buffer.
task.appendTo(dom);
}
// Close the action element.
dom.closeElement(actionElement);
}