cancel
Showing results for 
Search instead for 
Did you mean: 

Check box + Table Integration

Former Member
0 Kudos

Hi, I wanted to be able to get the ID of the selected row using a check box. For example


ID
[ ]123
[ ]456
[ ]789

[Get Selected Row] - Button

when I check the 1st row's check box. then click the [Get Selected Row] Button, I would get 123


ID
[X]123
[ ]456
[ ]789

[Get Selected Row] - Button

when I check the 2nd and 3rd row's check box, i would get 456, 789


ID
[ ]123
[X]456
[X]789

[Get Selected Row] - Button

this is the only option, i know the row selection of the table, but i would like to use the check box as an alternative solution.

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

bernd_speckmann
Contributor
0 Kudos

Hello,

in your wdDoModifyView you should try this:

IWDCheckBox cb_alt = (IWDCheckBox)view.getElement("your_checkbox_id");

            cb_alt.mappingOfOnToggle().addSourceMapping("nodeElement", "row");

Assign an action to your checkbox onToggle event and add a parameter "row" with type com.sap.tc.webdynpro.progmodel.api.IWDNodeElement.

In your action assigned to the onToggle event of your checkbox do the you can get the index of the actual checkbox and read the appropriate ID:

wdContext.mynode.getMynodeElementAt(row.index()).getID();

Regards,

Bernd

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

what's the problem?????

Former Member
0 Kudos

I couldn't get the value.

junwu
Active Contributor
0 Kudos

how  you try to get the value?

loop through node cannot make it?

you can also try parameter mapping via the checkbox, which may be too advanced for you.