Exactly, it also expected instances of UIInput.
Blast. <s:decorate> offered exactly the sort of behaviour I was needing.
Cheers for the reply.
You know that Trinidad does most of this for you right? (but if you want to customise what it looks like...) - it flags invalid fields with a cross, and puts the error message underneath.
Cheers for the tip. I'd seen that but my components are in simple="true" mode so I lose this sort of behaviour. I can't really change this either since:
1. simple="false" causes most components to use tables for their layout and this has implications for accessibility/screen readers etc. therefore I am avoiding it like the plague;
2. my screen design is sensitive to changes in the size of the fields - my fields are constrained to a relatively small space, so any expansion of my fields' real estate due to error messages will cause problems with layout;
3. Yes, I would need to customise the l&f. A custom skin would probably allow this, but the <s:decorate> offers the ideal solution in that I can report errors globally and then use simple field highlighting (say, change border colour or add a small icon) to draw attention to the offending field.
Are you familiar with the <s:validateAll> <s:decorate> UI tag code? I might look to creating a patch to handle Trinidad components - I wonder if making this modification is simple or potentially opening a huge can of worms?
1, 2) Yup, they really need to create an xhtml div/css based renderer (IMO) - I suppose we should start nagging ;)
http://jira.jboss.org/jira/browse/JBSEAM-501 - easy but waiting on them releasing :(
Can you just use h:input***?
Good suggestion!! I'd tried this before and not been able to render regular components along side Trinidad, possibly this was related to my issue that I had with mixing Trinidad, Ajax4Jsf and Seam:
...anyway, my upgrade to MyFaces 1.1.5 has also resolved this rendering problem, so moving to <h:inputText> now works a treat.
Oh yeah, +1 on your XHTML/CSS comment for Trinidad rendering.