title: Check All Radio Buttons (JSF Component) + jQuery
body: <p>I've a form in which I'm iterating a datatable, each row has a set of components and one of them is:</p>
  
  <pre><code>&lt;h:selectOneRadio id="chargeWaive" onclick="alert(this.id);" &gt;              &lt;f:selectItem itemLabel="Charge" itemValue="charge" /&gt;                  &lt;f:selectItem itemLabel="Waive" itemValue="waive" /&gt;
  &lt;/h:selectOneRadio&gt;
  </code></pre>
  
  <p>I've added two links that triggers two similar functions :</p>
  
  <pre><code>&lt;a href="#" onclick="selectAllCharge();"&gt;
     &lt;h:outputText value="Charge All" /&gt;
  &lt;/a&gt;
  
  &lt;a href="#" onclick="selectAllWaive();"&gt;
     &lt;h:outputText value="Waive All" /&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>So when the user clicks on one these links, all the Charge/Waive radiobuttons should be checked.</p>
  
  <p>I've tried to check the first radio button (test purpose) by using one the following codes, but I always get the same error:</p>
  
  <pre><code>$('#frmResults:billingRecordId:0:chargeWaive:0').attr('checked', true);   $('#frmResults:billingRecordId:0:chargeWaive:0').attr('checked', 'checked');
  $('#frmResults:billingRecordId:0:chargeWaive:0').prop("checked", true); 
  </code></pre>
  
  <p>The error that I'm getting is: <strong>Sintax error, unrecognized expression: billingRecordId</strong></p>
  
  <p>I do know the id is correct because when I look into the compiled JSF code the generated ID for the <strong>radio</strong> type is:</p>
  
  <pre><code>&lt;input type="radio" name="frmResults:billingRecordId:0:chargeWaive" id="frmResults:billingRecordId:0:chargeWaive:0" value="charge" onclick="alert(this.id);" /&gt;&lt;label for="frmResults:billingRecordId:0:chargeWaive:0"&gt; Charge&lt;/label&gt;
  
  &lt;input type="radio" name="frmResults:billingRecordId:0:chargeWaive" id="frmResults:billingRecordId:0:chargeWaive:1" value="waive" onclick="alert(this.id);" /&gt;&lt;label for="frmResults:billingRecordId:0:chargeWaive:1"&gt; Waive&lt;/label&gt;
  </code></pre>
  
  <p>So at this point I don't know what I'm missing here. Any idea?</p>