I'm trying to improve my web app. I read this article http://balusc.blogspot.com/2011/01/jsf-20-tutorial-with-eclipse-and.html and tried to implement some of the ajax stuff (I'm very new to JSF and Ajax).
So the first form works as expected, but when I pass to the second page the message malformedXML: During update: accessForm:passMessage not found is shown in an alert box.
Can anyone explain me why?
    <h:form id="accessForm">
        <h:panelGrid columns="3">
            <h:outputLabel for="user" value="Usuario:"
                           style="float: right" />
            <h:inputText id="user" value="#{userVerifier.username}"
                         required="true"
                         requiredMessage="Introduzca su nombre de usuario.">
                <f:ajax event="blur" render="userMessage" />
            </h:inputText>
            <h:message id="userMessage" for="user" style="color: #FF0000;" />
            <h:outputLabel for="pass" value="Contraseña:" 
                           style="float: right" />
            <h:inputSecret id="pass" value="#{userVerifier.password}"
                           required="true"
                           requiredMessage="Introduzca su contraseña." redisplay="true">
                <f:ajax event="blur" render="passMessage" />
            </h:inputSecret>
            <h:message id="passMessage" for="pass" style="color: #FF0000;" />
            <h:panelGroup />
            <h:commandButton value="  Entrar  " action="#{userVerifier.check}" 
                             style="float: right" >
                <f:ajax execute="@form" render="@form" />
            </h:commandButton>
            <h:messages globalOnly="true" layout="table" />
        </h:panelGrid>
    </h:form>
Thanks in advance.
Update
Here's the Bean code:
@ManagedBean
@SessionScoped
public class UserVerifier{
    private String username;
    private String password;
    private String dependencia;
    private String tipoUsuario;
    private final Database db = new Database();
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getDependencia() {
        return dependencia;
    }
    public void setDependencia(String dependencia) {
        this.dependencia = dependencia;
    }
    public String getTipoUsuario() {
        return tipoUsuario;
    }
    public void setTipoUsuario(String tipoUsuario) {
        this.tipoUsuario = tipoUsuario;
    }
    public String check() {
        String isValidUser = db.checkUser(username, password);
        if (isValidUser.equals("T")) {
            dependencia = db.getDependencia(username, password);
            tipoUsuario = db.getTipoUsuario(username);
            System.out.println("tipoDepe: " + dependencia);
            System.out.println("tipoUser: " + tipoUsuario);
            if (dependencia != null && tipoUsuario != null) {
                return "upload-file";
            } else {
                setUsername("");
                setPassword("");
                return "index";
            }
        } else if (isValidUser.equals("F")) {
            setUsername("");
            setPassword("");
            return "index";
        } else {
            return "error-pnf";
        }
    }
}
 
     
    