AnsweredAssumed Answered

Wizard: Error Message in the same page

Question asked by lmoulin on Jan 31, 2008
Latest reply on Feb 5, 2008 by lmoulin
I have developed a new Wizard.
I have override the next() method.
To display an error, I use the method 'Utils.addErrorMessage'.

public String next()
         FacesContext context = FacesContext.getCurrentInstance();
         // Verification que tout est saisi
         if (this.firstName.equals("") || this.lastName.equals("") ||"") || this.login.equals("") || this.password.equals("") || this.confirmPassword.equals("")) {
            Exception ex = new Exception("Tous les champs sont obligatoires. Veuillez les renseigner.");
            Utils.addErrorMessage(formatErrorMessage(ex), ex);
            return null;

But the system displays the error message in the next page.
Is it possible to display the error message in the same page (without do the next method).

Thanks a lot for your answer.