-
1. Re: <s:validate/>, <s:decorate> and Trinidad
gavin.king Feb 21, 2007 11:01 AM (in response to lowecg2004)Exactly, it also expected instances of UIInput.
-
2. Re: <s:validate/>, <s:decorate> and Trinidad
lowecg2004 Feb 21, 2007 11:11 AM (in response to lowecg2004)Blast. <s:decorate> offered exactly the sort of behaviour I was needing.
Cheers for the reply.
C. -
3. Re: <s:validate/>, <s:decorate> and Trinidad
pmuir Feb 21, 2007 11:14 AM (in response to lowecg2004)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.
-
4. Re: <s:validate/>, <s:decorate> and Trinidad
lowecg2004 Feb 21, 2007 11:39 AM (in response to lowecg2004)Hi Pete,
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?
Cheers,
Chris. -
5. Re: <s:validate/>, <s:decorate> and Trinidad
pmuir Feb 21, 2007 11:45 AM (in response to lowecg2004)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***? -
6. Re: <s:validate/>, <s:decorate> and Trinidad
lowecg2004 Feb 21, 2007 12:17 PM (in response to lowecg2004)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:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=101579
...anyway, my upgrade to MyFaces 1.1.5 has also resolved this rendering problem, so moving to <h:inputText> now works a treat.
Thanks!
C. -
7. Re: <s:validate/>, <s:decorate> and Trinidad
lowecg2004 Feb 21, 2007 12:18 PM (in response to lowecg2004)Oh yeah, +1 on your XHTML/CSS comment for Trinidad rendering.