Object onDismiss(Long alertId) { // If the alert was created inside an Ajax request and AlertStorage did not previously // exist, it can be null when the dismiss event comes up from the client. if (storage != null) { if (alertId != null) { storage.dismiss(alertId); } else { storage.dismissAll(); } } return null; }