posted 11 years ago
Welcome to the JavaRanch, Denis!
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.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.