title: Possible to set the styleClass of a xp:control from validator class?
body: <p>For a form I have set up a validaor for an Edit Box e.g.:</p>
  
  <pre><code>&lt;xp:inputText
      id="inpRiskFactors" 
      styleClass="inputEscalation"
      value="#{matterBean.matter.escRiskFactors}" 
      validator="#{matterValidators.valEscRiskFactors}"...
  </code></pre>
  
  <p>Here is a snippet from my validating method:</p>
  
  <pre><code>public void valEscRiskFactors(FacesContext facesContext, UIComponent component, Object value) {        
          utils.printToConsole(this.getClass().getSimpleName().toString() + " - valEscRiskFactors(...), value = " + value.toString());
          String msg = null;
          if (value.toString().replaceAll("\\s+","").equals("")){
              msg = matterProp.getProperty("msg_valid_esc_risk_factors");
              FacesMessage message = new FacesMessage(msg);
              throw new ValidatorException(message);
          }       
      }
  </code></pre>
  
  <p>I was wondering if I could change/set the styleclass property of the calling component (UIComponent component) from this method?</p>
  
  <p>For the user it would be nice to apply some CSS on the xp:controls that are required and do not pass the validation.</p>
  
  <p>Anyone have a clue how to achieve this?</p>