Ronald Holshausen <[EMAIL PROTECTED]> wrote on 10/07/2005 11:30:21 AM:
> aah! There is a bug with the AbstractFacesBean message functions. They
> do not set the client id when adding the messages. It was fixed in
> nightly build 20050921, but I don't think it has been tested yet.
>
> I never used the methods in AbstractFacesBean, but it is easy to test.
> You can add the messages yourself by using
> context.addMessage(clientId, message).
*Fantastic*, thanks so much, Ronald! Certainly that was the problem..
though my solution as suggested by you is a bit ironic, since I went down
the path of AbstractFacesBean.errors(...) mainly since I wanted to avoid
having to get the clientId in the first place..:)
So my code now is the rather ugly:
FacesContext.getCurrentInstance().addMessage(password.getClientId(FacesContext.getCurrentInstance()),
new
FacesMessage(messages.getMessage("password.mismatch")));
instead of the sleek:
errors(password, messages.getMessage("password.mismatch"));
But I guess "it works" beats good looks any day, huh? ;)
Thank you again!
Geeta