title: How to update the style of a JSF component at runtime
body: <p>How to update the style of a JSF component at runtime, I must clarify that I want to change the position of the component and in some cases hide it.</p>
  
  <pre><code>&lt;ui:define name="reverso" id="reverso" &gt;
         &lt;!-- Logo Estado Próspero --&gt;
         &lt;p:graphicImage value="./resources/oficiales/prospero.png" style="width: 90px; height: 50px;position: relative; left: 150px" /&gt;
         &lt;h:form id="dataRfc"&gt;
              &lt;h:outputText id="display_rfc" rendered="true" value="#{IDWizard.rfc}" binding="#{IDWizard.outRfc}" style="color: #333333;text-align:center;margin-top: 30px" /&gt;
         &lt;/h:form&gt;
  &lt;/ui:define&gt;
  
  public void setNoPersonal(String noPersonal) {
      this.noPersonal = noPersonal;
      this.outNombre.setValue(this.noPersonal);
      this.outNombre.setRendered(true); 
      this.outRfc.setStyle("text-align:left;color:red;margin-top:2px"); 
      //component.getAttributes().put("style", "color:red");
      this.outRfc.setRendered(true);        
  }
  </code></pre>