title: JSF 2: duplicate IDs inside p:dataList
body: <p>i have a list of billable services per client and i'm trying to build a table where the user can select which ones shall actually be billed:</p>
  
  <pre><code>&lt;p:dataList value="#{billController.billings}" var="billings"&gt;
      &lt;p:dataTable value='#{billings.billablesDataModel}' var='item' selection="#{billings.toBill}"&gt;
          &lt;f:facet name="header"&gt; 
              &lt;h:outputText value="#{billings.client.id}" /&gt;
          &lt;/f:facet&gt;
  
          [...]
  
      &lt;/p:dataTable&gt;
  &lt;/p:dataList&gt;
  </code></pre>
  
  <p>the problem is, that all the dataTables are rendered with the same ID attribute (<code>j_idt9:j_idt13:0:j_idt14</code>) which is automatically assigned by JSF. i'm suspecting this is causing that the selection doesn't work. (the backing bean <code>billings.toBill</code> is not updated/stays empty.)</p>
  
  <p>i was trying to set the ID attribute of the <code>dataTable</code> manually like this:</p>
  
  <pre><code>&lt;p:dataTable id="#{billings.client.id}" ...&gt;
  </code></pre>
  
  <p>however, i get the following error:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Empty id attribute is not allowed
  </code></pre>
  
  <p>(<code>#{billings.client.id}</code> is definitely set to the unique client's ID as i get the right output from an <code>h:outputText</code> for debug purposes.)</p>
  
  <p>can you help me fixing this?</p>
  
  <p>i'm using JSF Mojarra 2.1.1 and PrimeFaces 3.2 on a Tomcat 6.</p>