I have a template in which I can add the CSS error class to the div when the component check did not work, and it has a pretty nice effect on the browser.
Now I do not need to add the css class to the component ( this will not help me), but rather I need to change the css html that surrounds it, it is quite simple with jQuery, however I can not find the javascript answer for the failed check, is this possible? I also use simple fonts (if they provide such features).
Markup:
<div class="control-group ERROR_CLASS_GOES_HERE_IF_VALIDATION_FAILED"> <label class="control-label">Input value:</label> <div class="controls"> <h:inputText class=" inputbox" type="text" required="true" /> </div> </div>
if the input text is empty, I need a div that wraps a “control group” in order to have an extra class. I can turn it into <h:panelGroup> , so this is a JSF component, but still I don't know how to do it. Javascript seems simpler than I can:
jQuery("#ID_OF_DIV").addClass("error_class")
arg20 source share