Welcome to the JavaRanch, Ricardo!
You can make your code samples easier to read by using the "Code" button on the message editor.
JSTL does not play well with
JSF. In almost all cases, JSF has its own solution and JSTL isn't the best solution in any case, but because JSTL is designed to work with JSPs and not JSF View Templates, it can be very frustrating, regardless.
It's also
very bad practice to put logic in the View Definition.
Here's a cleaner solution:
This requires adding a public "getQtdeValid()" method to the document backing bean (Model) that returns "yes" or "no".
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.