• Post Reply Bookmark Topic Watch Topic
  • New Topic

issue while Sorting the column of trinidad table and deleteing the row from the table

 
Rax Malhotra
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

I am using a trinidad table component with some 'n' columns. I have populated the table with a list. Now, I am trying to delete one of the row of the table by checking the checkbox provided to select the record to be deleted (using rowSelection="multiple" attribute of the table) But here i am facing one issue, whenever i am using sorting property of the column i.e. after sorting the column if i check one of the row then some other record is getting deleted instead of the one which i have selected or sometimes i am getting the different SelectedRowKeys for the selected ones.

Can anyone help me out with this problem.



---------------------
Rax Malhotra
SCJP 5.0
 
Viswanath Tg
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before deleting check weather you are getting the selected object in the backing bean or not...
use the primary key of that object and delete it form the DB and then reRender to the list
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!