GWT and IE7 - getting a browser to remember passwords

I am using GWT and created a login form. I've tried all sorts of ways to get IE7 to prompt remember login information, but with no success. I thought that maybe this would work (but it doesn't):

    TextBox submit = new TextBox();
    submit.getElement().setAttribute("type", "submit");

      

Any ideas?

+1


source to share


5 answers


You can just assign values:

private TextBox mName = new TextBox();
private PasswordTextBox mPassword = new PasswordTextBox();

mName.setText("username");
mPassword.setText("password");

      



In your case, I would store the values ​​in cookies and read them on startup.

public static String getLastLoginName()
{   
    return Cookies.getCookie(LAST_LOGIN_COOKIE);
}

public static void setLastLoginName(String userName)
{
    Cookies.setCookie(LAST_LOGIN_COOKIE, userName);
}

      

+2


source


I don't know GWT, but you might need to somehow set an attribute on the form tag -
autocomplete = "on", which worked for me several times.



More info here: http://msdn.microsoft.com/en-us/library/ms533486.aspx

0


source


If the password textbox is of type password, bowser should prompt to save the password ... Make sure that for the Confirm option to save the password in Tools> Internet Properties> Content> AutoComplete (settings) you can check.

0


source


One thing I was able to accomplish was wrapping static elements (elements in the actual HTML page, not those created with Java).

0


source


Both Sarego and Drake hinted at a possible solution:

I'm not sure, but you might need a PasswordTextBox to start IE "remember this password". Also, IE can get confused about the elements being bare and not inside a FORM element.

I am actively developing with GWT and we have implemented our own "remember me" function using cookies, it tends to be more reliable and predictable. Then your application can control the removal of the forgotten password (ie the corresponding "forget me" function).

0


source







All Articles