title: Selection or double click in JSF (or Primefaces) outputText
body: <p>I'm using JSF and Primefaces. I have an h:outputText which holds a lot of text in it. It is mostly just text that the user just views and I do not want to start putting it into a datatable if possible.</p>
  
  <p>But I do need an event when a user double clicks on a word (or any other selection event will do).</p>
  
  <p>Is there any way to get such an event with the selected word or (even better) the location inside the text (e.g. after how many characters the double click was done)?</p>
  
  <p>If I need to change the element - to which one should I change it so that it remains relatively simple?</p>