function _processButton($dlg, buttonId, autoDismiss) {
        if (autoDismiss) {
            _dismissDialog($dlg, buttonId);
        } else {
            $dlg.triggerHandler("buttonClick", buttonId);
        }
    }
@private
If autoDismiss is true, then dismisses the dialog. Otherwise just raises an event that the
given button was clicked.
@param {$.Element} $dlg The dialog element to be dismissed.
@param {string} buttonId The ID of the button that was clicked.
@param {boolean} autoDismiss Whether to autodismiss the dialog on a button click.