Showing results for 
Search instead for 
Did you mean: 

get specific row selected in tableview

Former Member
0 Kudos

I have a tableview that has a link column. When I click the link a method is called which navigates me to a specific JSP page. Works great. Now I want to be able to pass some specific information on to my bean when the link is clicked. Here is a code snippet:

Vector colVector = new Vector();
DefaultTableViewModel tvm = new DefaultTableViewModel(resultVector, colVector);


return tvm;

public void onLinkClicked (Event evt){
    //Go to JSP

I would also like to know how to make the Column 'uID' invisible, but that is the value I would like to pass to my bean if the link is clicked for that particular row. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

On the Dynpage:

public void LinkClicked(Event event) throws PageException {

TableCellClickEvent tcce = (TableCellClickEvent) event;

int rowIndex = tcce.getVisibleRowIndex();

//clicked row

TableColumn Tcolumn = myBean.model.getColumn("uID");


//value of uID at that row



private int rowIndex;


public void setClickedUID(String string) {

this.uID = string;


public String getClickedUID() {

return this.uID;


Plz don't forget points, if it helped!



Former Member
0 Kudos

Thanks for the reply. I put your code in but it is bombing out at TableCellClickEvent tcce = (TableCellClickEvent) evt;

Which I don't understand. Any ideas?

Former Member
Former Member
0 Kudos

I just edited my last post b/c I figured out the model part, and found that the issue is really a casting error with the TableCellClickEvent part. Because if I comment it all out and hardcode the rowIndex to = 1 or something, the code works.

Message was edited by: Peter Ingarra

Answers (1)

Answers (1)

Active Contributor
0 Kudos

Hi Peter,

setting a column being invisible works,

But there is a pitfall, see

Hope it helps