JSF View Definition Language is not a programming language, it's a View templating language. What this means is that a View Definition is not a linear sequence of instructions, it is a 2-dimensional template of the desired display. Therefore linear constructs such as JSTL "set" elements cannot be expected to work properly.
The setting of HTML div-level attributes based on the status of JSF elements within them is not common practice and I cannot think of an easy way to do it. In any event, you don't seem to have attached any validation constraints to the inputText control, so I wouldn't expect to even see any JSF validation errors.
In cases where validation is in effect, such as the "required="true"" constraint, the usual custom when you want to flag the offending control is to bind an h:message tag to the control.
An IDE is no substitute for an Intelligent Developer.
Joined: Jul 19, 2012
Thanks for answer, Tim.
For example, if needed make input's label red, this no problem with class in wrapping div. Anyway may use jQuery for copy class, but it is not beauty way.
I already use h:message for display error text in this component and I really happy that this works=)
jQuery can probably do it. if you attach an "oncomplete" script to your submit button that invokes a jQuery script that checks for the presence of text in the "h:message", then that script could adjust the div's class properties.