Cookies disabled messages in IE8

I welcome!

There was a problem with messages about inaccessible files cookies.
System messages are redefined so I -


...
    public static SystemMessages getSystemMessages() {        
    	CustomizedSystemMessages systemMessages = new CustomizedSystemMessages();
...    	
    	//
    	// CookiesDisabled Messages
    	//
    	systemMessages.setCookiesDisabledNotificationEnabled(true);
    	systemMessages.setCookiesDisabledCaption("Cookies- файлы сохранения предпочтений отключены");
    	systemMessages.setCookiesDisabledMessage("Логин и пароль не будут сохранены");    	
    	//systemMessages.setCookiesDisabledURL(null);

    	return systemMessages;    
    }

...

12122.png

Then I can assume the form of authorization for setting preferences -


...
	private HashMap<String, String> readCookies() {
		Cookie[] cookies = request.getCookies();
		HashMap<String, String> authPairs = null;
			if(cookies != null) {
				authPairs = new HashMap(); 
				String patternStr = "introGisLogin";
				String delimiterStr = ":";
				for(int i = -1; ++i < cookies.length;) {
					String cookiesName = cookies[i]
.getName();
					String cookiesValue = cookies[i]
.getValue();			
					
					if(cookiesName.length() > 13 && 
							cookiesName.substring(0, 13).equals(patternStr)) { 
						
						String login;
						String password;				
						StringTokenizer stringTokenizer = new StringTokenizer(cookiesValue, delimiterStr, false);
						
						while(stringTokenizer.hasMoreTokens()) {
							login = stringTokenizer.nextToken();
							password = stringTokenizer.nextToken();
							
							authPairs.put(login, password);
					    }
					}
				}
			}
		return authPairs;
	}
...

In the main application class, respectively, to record -


...
	private void saveAuthInfoInCookies(String login, String password) {
		Cookie cookie = new Cookie("introGisLogin" + login + password, login + ":" + password);
		cookie.setMaxAge(3600);
		response.addCookie(cookie);
	}

...

Further, the listener expose passwords depending on the login -


...
	public void valueChange(ValueChangeEvent event) {
		String login = event.getProperty().toString();
        if(hMap != null && hMap.size() != 0) {
        	Set keys = hMap.keySet();
        	for(Object o : keys) {
        		String keyValue = o.toString();
        		String passValue = new String("");
        		if(login != null && login.equals(keyValue)) 
        			passValue = hMap.get(o.toString());
        		
        		passwordTextField.setValue(passValue);
        	}
        }

	}

...

12123.png

However, when the storage disconnect preference - no message appears -
12124.png

And my code is not working correctly.

How to make a call notifications when disabled cookies?

I would be grateful for the information! :smiley:

Cheers,
Thx

All I figured out.
12125.png

Sorry, error in listener -


...
        if(hMap != null && hMap.size() != 0) {
        	Set keys = hMap.keySet();
        	for(Object o : keys) {
        		String keyValue = o.toString();        		
        		if(login != null && login.equals(keyValue)) { 
        			password = hMap.get(o.toString());
                	break;
        		}        		
        	}
			loginComboBox.setValue(login);
        	passwordTextField.setValue(password);
        }

...