This content has been marked as final.
Show 2 replies
-
1. Re: rich:messages for=
jose.ventura May 17, 2009 10:46 AM (in response to jose.ventura)update: I saw the code in the following classes: org.richfaces.renderkit.html.HtmlRichMessagesRendered and org.richfaces.component.UIRichMessages
Seems the problem happens around line UIRichMessages:116 :(...) if (null != componentFor) { addMessagesForId(context, componentFor.getClientId(context), severenities); }
(also, typo on "severenities", should it be "severities"?)
I then had the idea to modify my method to refer to the textfield using its full ID (that is, together with the form id):public String testMethod() { FacesMessage fm = new FacesMessage( "hardcoded error!" ); fm.setSeverity( FacesMessage.SEVERITY_ERROR ); FacesContext.getCurrentInstance().addMessage( "classificationForm:theText", fm ); return ""; }
This works on all cases. However, I'm still not sure that the behaviour should be different from the standard h:messages tag. Is this intentional?
Thanks in advance! -
2. Re: rich:messages for=
nbelaevski May 17, 2009 11:30 AM (in response to jose.ventura)You should use clientId (e.g. "classificationForm:theText") when message are added.