Skip to Content
0
Former Member
Nov 20, 2003 at 11:57 AM

How do refer to 2 tableView models in TableCellClickEvent

24 Views

Hi All

I have 2 table view models each in their own JSPs. In my portal component java file...in my doContent method I want to capture the value clicked by the user, so I have this code to do that:

//*************************************************************************************************

if(event instanceof TableCellClickEvent){

TableCellClickEvent tcce = (TableCellClickEvent) event;

int realSelectedRow = tcce.getVisibleRowIndex() + Integer.parseInt(myBean.getVisibleRow()) - 1;

int realSelectedColumn = tcce.getVisibleColIndex();

String x = myBean.getModel().getValueAt(realSelectedRow, realSelectedColumn).toString();

aResource = request.getResource("jsp","pagelet/WildcardUsers.jsp");

if(eventName.equals("myOnCellClick")){

aResource = request.getResource("jsp","pagelet/WildcardUsers.jsp");

response.write("");

myBean.setUser(x);

}//end if(eventName.equals("myOnCellClick"))

}//end if(event instanceof TableCellClickEvent)

//****************************************************************************************************

This code refers to a cell clicked in one model, how do I distinguish between another model within this TableCellClickEvent statement ?

Thanx in advance

Rakhee