This content has been marked as final.
Show 2 replies
-
1. Re: How to display more messages for id
stephen May 26, 2008 10:26 AM (in response to kooudy)Interesting one. Both the Sun RI message tag and Trinidad's message tag display only the first message.
That seems not be standards compliant. JSF spec:
4.1.7 UIMessage (extends UIComponentBase) encapsulates the rendering of error message(s) related to a specified input component. ... "for" attribute: Identifier of the component for which to render error messages.
You probably have to check for any existing message yourself and append new text :-(
Maybe you should discuss that on sun's JSF forum?!
-
2. Re: How to display more messages for id
kooudy May 26, 2008 2:14 PM (in response to kooudy)I have a workaround:
public List<String> getFacesMessages(String id) { Iterator<FacesMessage> iter = FacesContext.getCurrentInstance() .getMessages(id); List<String> result = new ArrayList<String>(); while (iter.hasNext()) { FacesMessage msg = iter.next(); result.add(msg.getDetail()); } return result; }