I have an idea, but it's kind of a hack, so hopefully someone has a better idea, but I'll give it to you anyway. Create an Event scoped bean, with a Map<String,FacesMessage[]> field, where you override the get() to do your bidding:
/*bean fluff*/
private Map<String,FacesMessage[]> facesMessageMap = new HashMap(){
@Override
public FacesMessage[] get(Object _key){
String key = _key.toString();
return FacesContext.getCurrentContext().getMessageList(key);
}
}
public Map<String,FacesMessage[]> getFacesMessageMap(){return facesMessageMap;}
/*more bean fluff*/
Then, in your EL, you specify #{bean.facesMessageMap[cc.attrs.for]}
Give this a try. Did this off the top of my head, so you may have some errors you need to work through, but the idea is there.
-ds
[Message sent by forum member 'digitalseraphim']
http://forums.java.net/jive/thread.jspa?messageID=394717