Hi,
is it possible to change the background color of an input field,
if there are any validation errors.
I treid the follwoing but ist doesn't work. Style is changed only on complete
request:
<h:inputText id="attPersonNr" value="#{props.attributes['value'].value}" size="18" required="true" tabindex="2" style="#{classifyBean.errorOccured ? 'background-color:red;' : 'background-color:white;'}"> <rich:ajaxValidator event="onblur" ajaxListener=" #{classifyBean.ajaxError}"/> </h:inputText>
there is no reRender on validator so nothing updated except messages. input should be updated to change style. B.t.w. if you using Seam - it could be much more simplier. Check Seam Validation chapter 9 in its reference.