title: JSF/Primefaces: Open dialogue by click on datatable entry
body: <p>I have JSF project with PrimeFaces.</p>
  
  <p>I have a 'dashboard' in my project that contains a small p:panel with a p:datatable. The data in my table gets updated dynamically by my beans. I want to be able to click on one of the labels to open up a dialogue with more data. </p>
  
  <p>This is what a typical column looks like:</p>
  
  <pre><code>&lt;p:column  style="text-align: left"&gt;
      &lt;f:facet name="header"&gt;
         &lt;h:outputText value="Name"/&gt;
      &lt;/f:facet&gt;
      &lt;h:outputText value="#{t.name}" style="text-align: left"/&gt;
  &lt;/p:column&gt;
  </code></pre>
  
  <p>Then I would have another column for something like totals or time, it depends.</p>
  
  <p>In my bean I have a sql query running and populating a list which populates the datatable,nothing intricate.</p>
  
  <p>How would I go about - efficiently - making or replacing the outputText so it's clickable and opening a dialogue which would be populated with data based on which value I clicked on. </p>
  
  <p>The problem I think that I might encounter is that the value in that column is a name, and not an ID in my db (which I will need to get the rest of the data to populate the dialogue box)</p>
  
  <p>Should I change the outputText to a link and have some sort of ajax call to open up the dialogue box and get the data?</p>