setStyleClass method is overriding the already defined styleClass
问题 I have a jsf code like this: <h:inputText id="emailText" styleClass="emailAddress" value="{bean.emailText}"/> I am adding the style emailAddress to use it in jquery for restricting the user from copying and pasting text in textbox like below: jQuery(".emailAddress").bind("copy paste",function(e) { e.preventDefault(); }); But on click of Submit, when the text field is validated and if the text entered is in improper format, bean side, I am adding another style class to the textbox to highlight