Thanks Volker for your help

I can't use the approach with the isXXXError() method,
because my BackingBean contains a dynamic Map with attributes.
Therefore I can't hardcode getters for the attributes or the errors.

So I try to implement such a MessagesWrapper by myself.
I create a new RequestScoped BackingBean that extends HashMap  and
overwrites the getter, right?

public Object get(Object key) {
 String keyString = (String) key;
 return
FacesContext.getCurrentInstance().getMessages(keyString).hasNext();
}

Thanks for putting me on this way.
Michael

-----Original Message-----
From: Volker Weber [mailto:[EMAIL PROTECTED] 
Sent: Montag, 28. August 2006 13:27
To: MyFaces Discussion
Subject: Re: output text depending on message

Hi,

> I hope there is a Map with messages, that would be accessible with the
fieldID????

no, there isn't, but if you realy want you can implement such a map
yourselve.

Or, as Gerald wrote, put a method like this in your backingBean

public void isCarIdError() {
return FacesContext.getCurrentInstance().getMessages("carId").hasNext();
}

that should do.

Regards
  Volker




Reply via email to