Firefox 3 remember me
hicham Sep 10, 2008 2:25 AMI am implementing a simple application that diplay registred users using seam 2.0.2.GA.
I have an issue using firefox 3 :
When I log in through the loging page:
Email : admin@domain.com Password : xxxxxxxxxxx Remember me yes
And goes to the page of user Creation. I find that my form is pre-filled in this way :
Email : Name : admin@domain.com Password : xxxxxxxxxxx
The NAME is pre-filled by the used logging EMAIL and the password is filled by the logging password.
This happens when I click on REMEMBER password in Firefox 3.
My user entity :
@Entity @Table(name = "user", catalog = "usersCat") public class User extends AbstractEntity { private static final long serialVersionUID = 1L; public static enum Role { admin, user } @Column(name = "email", nullable = false) @NotEmpty @Email private String email = null; @Column(name = "name", nullable = false) @NotEmpty @Length(min = 1, max = 255) private String name = null; @Column(name = "password", nullable = false) @NotEmpty @Length(min = 1, max = 20) private String password = null; @Column(name = "information", length = 65535) @Length(max = 65535) private String information = null; @Column(name = "role", nullable = false) @NotNull @Enumerated(EnumType.STRING) private Role role = null;
Login page :
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="body"> <h:messages globalOnly="true" styleClass="message" id="globalMessages" /> <h:form id="login" styleClass="edit"> <rich:panel> <f:facet name="header">Login</f:facet> <s:decorate id="usernameDecoration" template="layout/edit.xhtml"> <ui:define name="label">Email</ui:define> <h:inputText id="username" value="#{identity.username}" /> </s:decorate> <s:decorate id="passwordDecoration" template="layout/edit.xhtml"> <ui:define name="label">Password</ui:define> <h:inputSecret id="password" value="#{identity.password}" /> </s:decorate> <s:decorate id="rememberMeDecoration" template="layout/edit.xhtml"> <ui:define name="label">Remember me</ui:define> <h:selectBooleanCheckbox id="rememberMe" value="#{identity.rememberMe}" /> </s:decorate> <s:div style="clear: both"> <span class="required">*</span> required fields </s:div> </rich:panel> <s:div styleClass="actionButtons"> <h:commandButton value="Login" action="#{identity.login}" /> </s:div> </h:form> </ui:define> </ui:composition>
User Edit :
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://jboss.com/products/seam/taglib" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml"> <ui:define name="body"> <h:messages globalOnly="true" styleClass="message" id="globalMessages"/> <h:form id="user" styleClass="edit"> <rich:panel> <f:facet name="header">#{userHome.managed ? 'Edit' : 'Add'} User</f:facet> <s:decorate id="emailDecoration" template="layout/edit.xhtml"> <ui:define name="label">Email</ui:define> <h:inputText id="email" value="#{userHome.instance.email}" size="50" required="true"/> </s:decorate> <s:decorate id="nameDecoration" template="layout/edit.xhtml"> <ui:define name="label">Name</ui:define> <h:inputText id="name" value="#{userHome.instance.name}" size="50" required="true"/> </s:decorate> <s:decorate id="passwordDecoration" template="layout/edit.xhtml"> <ui:define name="label">Password</ui:define> <h:inputSecret id="password" value="#{userHome.instance.password}" size="50" required="true"/> </s:decorate> <s:decorate id="informationDecoration" template="layout/edit.xhtml"> <ui:define name="label">Information</ui:define> <h:inputTextarea id="information" cols="80" rows="4" value="#{userHome.instance.information}"/> </s:decorate> <s:decorate id="roleDecoration" template="layout/edit.xhtml"> <ui:define name="label">Role</ui:define> <h:selectOneMenu value="#{userHome.instance.role}" required="true"> <s:selectItems var="_role" value="#{userHome.getRoles()}" label="#{_role.toString()}" noSelectionLabel="Please select a role"/> <s:convertEnum/> </h:selectOneMenu> </s:decorate> <div style="clear:both"> <span class="required">*</span> required fields </div> </rich:panel> <div class="actionButtons"> <h:commandButton id="save" value="Save" action="#{userHome.persist}" disabled="#{!userHome.wired}" rendered="#{!userHome.managed}"/> <h:commandButton id="update" value="Save" action="#{userHome.update}" rendered="#{userHome.managed}"/> <h:commandButton id="delete" value="Delete" action="#{userHome.remove}" immediate="true" rendered="#{userHome.managed}" onclick="return confirmDelete(null, '#{userHome.instance.name}');"/> <s:button id="done" value="Done" propagation="end" view="/User.xhtml" rendered="#{userHome.managed}"/> <s:button id="cancel" value="Cancel" propagation="end" view="/#{empty userFrom ? 'UserList' : userFrom}.xhtml" rendered="#{!userHome.managed}"/> </div> </h:form> </ui:define> </ui:composition>
I have no problem creating and saving a new user. and my application works perfectly under IE7.
It works on Firefox 3, if only I choose not to remember my password by firefox.
Is any one experiencing this strange issue?
Thank you.