cancel
Showing results for 
Search instead for 
Did you mean: 

Table selection events

Former Member
0 Kudos

Hi,

I have a view with a table component in it. I would like to allow the user to perform the following actions:

1 - Select a single row to edit it (by showing appropriate CellVariants)

1.a - by performing a LeadSelection

1.b - simply by clicking on any cell of the row

2 - Select multiple rows, even non contiguous, to delete them

Currently I've implemented only point 1.a with the OnLeadSelect event.

In order to satisfy all the requirements perhaps I need to use the OnSelect event instead of OnLeadSelect (I've seen that they are mutually exclusive).

I'd like to know how to use Parameter Mapping with onSelect (what parameters I can get and what types are they). Also, what kind of SelectionMode for the Table component is best suited to my scenario?

Thank you,

Pietro

Edited by: pietro.m on Sep 22, 2010 9:26 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Unanswered question: closed due to inactivity

Former Member
0 Kudos

Hi,

To achieve your requirement 1.b do the following step :

1. create an action onSelect and map it to onAction event of table column.

2. use the add parameter mapping by this way for the action in doModifyView method.

IWDTableColumn column = (IWDTableColumn)view.getElement("Table Column Name");

column.mappingOfOnAction().addParameter("nodeElement", "nodeElement");

3. get this nodeElement in onSelect event and change the corresponding cell variant.

For selecting the multiple rows change the selectionMode property to multi .

Thanks & regards

Ravindra Singh

Former Member
0 Kudos

Hi Ravindra,

thank you for your reply.

Unfortunately Table columns does not have the event handler OnSelect (they don't have any, actually).

I'm using Netweaver 7.1 SP03 PAT0005 (can't update/upgrade to a different version, due to constraints in my workplace).

Thank you.

Former Member
0 Kudos

I've worked out how the onSelect method functions.

Now what I've got left to do is to make sure that when the user clicks on a cell, the row is selected.

Can someone help me with this?

Former Member
0 Kudos

Hi,

When you click at the Table cell editor, it simply means you have selected that particular row. For eg. when you use

wd...XXX.moveTo(i) it is equalent to your click at the cell editor, so if you use moveTo function or explicitly click at table cell editor, both are means the same.

Hope you understood.

Former Member
0 Kudos

Hi Sheik,

thank you for your reply. Unfortunately the problem is that when an user clicks on a cell it does not raise any event, as far as I know.

This is the screenshot of my table:

<a href="http://fumpr.com/share-BA3C_4C9A1E7D.html">Screenshot</a>

As you can see if I click on TESTVALUE, its row does not became selected.

I've seen some kind of tables that allow row selection by cell.

This is an example taken from SAP Netweaver Component Build Service (CBS)

<a href="http://fumpr.com/share-1D7D_4C9A1E7D.html">SelectionByCellTableScreenshot</a>

So the possibility exists. Only I don't know if the CBS table is another UI widget different from the Table I used in my webdynpro.

Hope this make things clear.

Thanks again,

Pietro