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?
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);
}
source to share
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
source to share
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).
source to share