title: How do I enable choosing a row of a h:dataTable using JSF 2.0?
body: <p>I'm starting a small project, using JSF 2.0.
  I'm having problems right in the start, in the CRUD of the first model implemented.</p>
  <p>What I want to do is pretty simple:</p>
  <p>The page has some filters to search, and using ajax, it populates a h:dataTable with the results.
  The user should now select the line with the result he wants to see/edit.
  But I just can't find a way to make the line selectable.</p>
  <p>This is my table:</p>
  <pre><code>&lt;h:dataTable var=&quot;aluno&quot; value=&quot;#{alunoController.resultado}&quot; &gt;
    &lt;h:column&gt;
       #{aluno.id}
    &lt;/h:column&gt;
    &lt;h:column&gt;
       #{aluno.nome}
    &lt;/h:column&gt;
    &lt;h:column&gt;
       &lt;!-- radiobutton, commandLink/Action goes gere --&gt;
    &lt;/h:column&gt;
  &lt;/h:dataTable&gt;
  </code></pre>
  <p>First I tried having a radiobutton on each line, then I learned that I can't have a radiogroup inside a table.</p>
  <p>Then I tried having a radio group inside the first cell of each line, and handling selection with a little bit of JavaScript. Somehow, the databinding doesn't work, and I cant get the selected model back in my ManagedBean.</p>
  <p>So I tried having a commandButton/Link, which sends the model via parameter.... not. It just refresh the page.</p>
  <p>The I tried using query parameters, sending the id of that row and getting the model from de database again, but I cant find a way to tell which method should be called in the ManagedBean.</p>
  <p>So I came here for my very first time, looking for suggestions. What should I do? Am I missing some information?</p>
  <p>I just don't want to believe what I want to do is too advanced.</p>