title: Primefaces p:lightbox being added multiple times when sorting p:datatable
body: <p>I am using primefaces 3.2 and JSF 2 running on GlassFish 3.1.2 and Java 6.</p>
  
  <p>I have a p:lightbox component inside the column of a p:datatable. Basically, I want the user to be able to click a p:commandbutton in a row and then display some information associated with the current row.</p>
  
  <p>This works fine normally, but if the user clicks on the header for a column to sort the rows, multiple lightboxes will appear when the user next clicks a p:commandbutton to display the lightbox. This is shown in the attached image. Also, not only do multiple lightboxes get appended, but the information no longer corresponds to the row where the p:commandbutton was clicked.</p>
  
  <p>My question is, how can can I get this to work to display lightboxes from inside a p:datatable and still allow the table to be sorted using ajax?</p>
  
  <p>This problem occurs in all 3 versions of the lightbox, even in iframe mode.</p>
  
  <p>It seems that this could be related to a problem other people had with the lightbox and pf 3: <a href="http://forum.primefaces.org/viewtopic.php?f=3&amp;t=18184" rel="nofollow noreferrer">http://forum.primefaces.org/viewtopic.php?f=3&amp;t=18184</a></p>
  
  <p><img src="https://i.stack.imgur.com/AOoLs.png" alt="Image showing problem with p:lightbox when sorting p:datatable rows"></p>