Skip to Content
author's profile photo Former Member
Former Member

How do refer to 2 tableView models in TableCellClickEvent

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2003 at 08:53 PM

    Doesn't

    tcce.getComponentName()

    deliver the name of the component? Maybe you could work with that?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanx Siegfried, I got it to work another way.

      To briefly explain..I used one model, two functions that sets the model with specific data, and in my abstract portal component..i called the the 2 different JSPs according to some options and those 2 functions.

      Regards

      Rakhee

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.