CustomizedSystemMessages and Invalid Security Key

Hi,

I’d like to hide the red message in case of Invalid Security Key problem and redirect to a given page.
I’ve ‘overriden’ the static ‘getSystemMessages()’ metod tu return a CustomizedSystemMessages that disable the 6 types of notifications (Authentication, Communication, CookiesDisabled, InternalError, OutOfSync, SessionExpired) and forwards to test url.

I open a first tab in my browser, login into my app, then open a second tab in my browser (same session/user of course) then logout (application is closed, session is invalidated), go back to the first opened tab, tries to click a button, it generates a red ‘Invalid Security’ banner and there is no redirection.

Which one of the 6 notification types is used for InvalidSecurity key ? What should I do to make it work ?


   public static SystemMessages getSystemMessages() {
        	CustomizedSystemMessages customizedMessages = new CustomizedSystemMessages();
                String orgHome = "http://www.google.com";

        	customizedMessages.setAuthenticationErrorURL(orgHome);
        	customizedMessages.setAuthenticationErrorNotificationEnabled(false);

        	customizedMessages.setCommunicationErrorURL(orgHome);
        	customizedMessages.setCommunicationErrorNotificationEnabled(false);

        	customizedMessages.setCookiesDisabledURL(orgHome);
        	customizedMessages.setCookiesDisabledNotificationEnabled(false);

        	customizedMessages.setInternalErrorURL(orgHome);
        	customizedMessages.setInternalErrorNotificationEnabled(false);

        	customizedMessages.setOutOfSyncURL(orgHome);
        	customizedMessages.setOutOfSyncNotificationEnabled(false);

        	customizedMessages.setSessionExpiredURL(orgHome);
        	customizedMessages.setSessionExpiredNotificationEnabled(false);
  
    	return customizedMessages;
    }

Nicolas