title: How to enable/disable specific item in selectManyCheckbox on ajax keyUp
body: <p>I need your help in enabling/disabling a specific item in the <code>selectManyCheckbox</code> component based on the ajax call keyup.</p>
  
  <p>When the page loads, I am firing the below method to populate the <code>selectManyCheckbox</code> items in the form:</p>
  
  <pre><code> @PostConstruct
  
      public void init() throws SQLException {
  
      this.hrCertificatesList.add(new hrCertificate(("Employment"), "CE", false));
  
      this.hrCertificatesList.add(new hrCertificate(("Loan"), "LC", false));
  
  }
  </code></pre>
  
  <p>And here is the jsf code:</p>
  
  <pre><code>  &lt;p:inputText id="selectedEmployee" value="#{HRRequest.selectedEmployeeCode}"&gt;
  
       &lt;p:ajax event="keyup" update="employeeName" listener="#{HRRequest.getEmployeeName}" /&gt;
  
     &lt;/p:inputText&gt;
  
  &lt;h:outputText id="employeeName" value="#{HRRequest.selectedEmployeeName}" /&gt;
  
  &lt;p:selectManyCheckbox id="hrCertificates" value="#{HRRequest.selectedHRCertificates}"&gt;
   &lt;f:selectItems value="#{HRRequest.hrCertificatesList}" var="hrCertificate" 
  itemLabel="#{hrCertificate.hrCertificateName}"
      itemValue="#{hrCertificate.hrCertificateCode}" itemDisabled="#{hrCertificate.hrBooleanCertificate}"/&gt;
  
      &lt;/p:selectManyCheckbox&gt;
  </code></pre>
  
  <p>Once the page loads, all the checkboxes are enabled and when the user enters employeeCode in the <code>inputText</code>, an ajax will be fired to call a method to get the employeeName and to check whether has loan or not, if has loan, then the checkbox should be enabled, otherwise disabled.</p>
  
  <p>To summarize my issue, what I want is that when the value of the variable temp equals to yes, then I need to disable the loan checkbox only and the other item Employment should remain enable, so how can I do this?</p>
  
  <p>The bean code is:</p>
  
  <pre><code> public String getEmployeeName() throws SQLException {
       if (temp.equals("Yes"))
  { 
  //How to enable and disable the Loan checkbox only and to update the form view
  RequestContext.getCurrentInstance().update(":HRform:hrCertificates");    
  }
  </code></pre>
  
  <p>So can you please help.</p>