title: change color of inputtext at row level on selectOneMenu(Dropdown) change in Datatable
body: <p>I am using primefaces(v.3.0) datatable in my application.
  In Datatable there are two columns , one column is inputtext and other is SelectOneMenu(dropdown).</p>
  
  <p>Now I want to change inputtext color with some cases like..</p>
  
  <p>1.if SelectOneMenu value get selected as "Single" input textbox color will be "green"  for that particular pID only.</p>
  
  <p>2.if SelectOneMenu value get selected as "Married" input textbox color will be "red"  for that particular pID only.</p>
  
  <p>3.if SelectOneMenu value get selected as "Divorced" input textbox color will be "yellow"  for that particular pID only.</p>
  
  <p>So I am trying in this way....</p>
  
  <pre><code>   &lt;h:form id="form"&gt;
  &lt;h:panelGrid columns="2" cellpadding="10" id="h"&gt;
          &lt;p:dataTable id="table" var="s"
                                  value="#{backingBean.arrayList}"
                                  widgetVar="empTable" rowKey="#{pt.pID}"
                                  paginator="true" rows="15"
  style="width: 100%;margin-bottom: 10px;" rowStyleClass="#{s.status}"&gt;
  
                                  &lt;f:facet name="header"&gt;  
             List of Patients Appointments  
          &lt;/f:facet&gt;
  
                                  &lt;p:column headerText="Status" id="t"&gt;
  
                          &lt;p:inputText value="#{s.status}" /&gt;
  
                      &lt;/p:column&gt;
  
  
                          &lt;p:column headerText="EmployeeAction"&gt;
                          &lt;p:selectOneMenu id="scAction" value="#{backingBean.obj.empStatus}"
                                  style="width:125px"&gt;
                                          &lt;f:selectItem itemLabel="Select" itemValue="" /&gt;
                                          &lt;f:selectItems value="#{schedulerBB.scheduleActionSelect}"
                                              itemLabel="#{backingBean.obj.empStatus}"
                                              itemValue="#{backingBean.obj.empStatusID}" /&gt;
                                      &lt;p:ajax event="change" listener="#{backingBean.changeColor(s)}"  update=":form" /&gt;
  
  
                                      &lt;/p:selectOneMenu&gt;
  
                                  &lt;/p:column&gt;
  
                          &lt;/p:dataTable&gt;
                          &lt;/h:panelGrid&gt;
                          &lt;/h:form&gt;
  
  In CSS
  
  .Single td:nth-child(1) input {
      background-color: green;
  }
  
  .Married td:nth-child(1) input {
      background-color: red;
  }
  
  .Divorced td:nth-child(1) input {
      background-color: yellow;
  }
  
  In BackingBean:
  
  private Employee obj;
  
      //Getter setter methods
  
      public Employee getObj() {
      if(obj==null){
      obj=new Employee();
      }
      return obj;
  }
  
  public void setObj(Employee obj) {
      this.obj = obj;
  }
  
  
  public void changeColor(Employee e){
  
    if(obj.getEmpStatus().equals("1")){  
  
          EmployeeDAO.updateEmpTable(e.getPID,e.getStatus);
  
      }
  
      css
      .Single td:nth-child(1) input {
      background-color: green;
  }
  
  .Married td:nth-child(1) input {
      background-color: red;
  }
  
  .Divorced td:nth-child(1) input {
      background-color: yellow;
  }
  </code></pre>
  
  <p>I am able to change the input text value on change of selectonemenu for that particular pID,but as you can
  see I have applied inputtextbox color change logic at column level ,so all columns inputtext color changes.</p>
  
  <p>So how can I apply logic of changing inputtext box color at row level(i.e for particular ID only)</p>