I did try that -- but unless simple/text.ftl changes, there will *still* be an unwanted "class='inputError'" before my cssClass and cssErrorClass attributes are handled by css.ftl. Your example produces the following broken tag:
<input name="port" value="" maxsize="5" class="inputError" class="prop-port inputError" /> It's closer -- but I believe that a change needs to be made in the simple/text.ftl template to check for existence of the "cssClass" attribute, or determine if it's being called from the css_xhtml theme's text.ftl, in which case it could decide not to handle adding the inputError error class (because it would know that css.ftl handled the situation). I plan on extending css_xhtml myself to deal with this problem, but was hoping to verify this issue with someone else, and get it on the dev team's radar if it's a real problem. On Dec 13, 2010, at 6:32 PM, Li Ying - liying.cn.2...@gmail.com wrote: > I read the source code of [simple/css.ftl], > it looks like trying to combine [cssClass] and [cssErrorClass]. > > So you can try: > > <@s.textfield name="port" value=port key="service.port" maxsize="5" > cssClass="prop-port" > cssErrorClass="inputError" > /> > > see if the result is what you want? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org