• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to select multiple rows in a datatable

 
smee bond
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a datatable code as follows:
<t ataTable>
<h:column>
<h:selectBooleanCheckbox id="contact" value="#{contact.selected}"/>
</h:column>

<h:column>
<h utputText value="#{contact.Name}" />
</h:column>

<h:column>
<h utputText value="#{contact.email}" />
</h:column>

</t ataTable>

I want to select multiple rows and when I click ADD (code not incl), I want to select the row data. Please help me with how to do this. Can I use <h:selectManyCheckbox>, but to select the complete row with this?
Thank you!
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This link will be helpful

Good luck

Select multiple rows datatables
 
smee bond
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the link. It seems to be very helpful.
sorry for the annoying smilies in the code! I had enabled it by mistake...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic