title: change color of inputtextfield on select booleancheckbox
body: <p>I have a form in which there is a selectbox, and a inputtext field with default red color.</p>
  
  <p>I want to change color of inputtextfield when that checkbox is selected.</p>
  
  <p>How can I do that?</p>
  
  <p>I am trying to achieve in this way, but unable to get change color.</p>
  
  <p>pojo:</p>
  
  <pre><code>private Boolean changeColor=false;
      private boolean sign1;
  
  public void ChangeColorEvent(){
          System.out.println("inside color change event");
  
          changeColor=true;
          sign1=true;
          }
  
  
  
  &lt;h:outputText value="understood and Signed?: " /&gt;  
              &lt;p:selectBooleanCheckbox  label="Yes" value="#{patient.sign1}" &gt;
              &lt;p:ajax update="hppa1" listener="#{patient.ChangeColorEvent}" /&gt; 
              &lt;/p:selectBooleanCheckbox&gt;
      &lt;h:panelGroup&gt;
      &lt;p:inputText id="hppa" size="5" style="color:White;background:Red;" rendered="#{!patient.changeColor}" /&gt;
      &lt;p:inputText id="hppa1" size="5" rendered="#{patient.changeColor}" style="color:White;background:Green;"/&gt;
      &lt;/h:panelGroup&gt;
  </code></pre>