Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting table row number when link is clicked question

 
Dan MacLeod
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a dataTableEx that contains a commandLink in one of it's columns. When the link is clicked and the backend action is invoked, how do I get the row number the selected link is in?

thanks
Dan
 
Dawn Charangat
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That has to be done at the time of table rendering.

Assuming that you would be dynamically creating your tables [either using javascript or any serverside scripting]. You'll have to assign a unique ID to your row, either with a sequence, or with the unique item in the object being populated in its row. Once the item with hyperlink is written to the table, you will have to add the item ID as a parameter in its URL [in the hyperlink]. That would help you identify which row's link was clicked.

Dawn.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic