cancel
Showing results for 
Search instead for 
Did you mean: 

which radiobutton in which lead is selected in table

Former Member
0 Kudos

Hi all

There is a column consisting of radiobuttons,one in each row, in my table.Now,I wanted to know which radiobutton ,in which lead is selected on click..I have checked that on selection of a radiobutton,the leadselection does not change.So,help me out to know which particular lead corresponding to its radiobutton is selected.

Regards

Udit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Udit,

I would suggest you attach a context attribute to the radio buttons which you need to set dynamically with the "Key to Select" value of selected radio button.

you can write the same code in OnSelect event.

Hope this helps.

Regards,

Anoop

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Create a value attribute (value) inside the node that is bound to Table. Now bind this attribute to the 'keyToSelect' property of the RadioButton. Now create another value attribute (key) under the main Context and bind it to the 'selectedKey' property of the RadioButton.

Now while creating and adding the element set the value of 'value' attribute to that of the index of the element, ie the position of the element in the table. Now on selecting a radio button that value will be stored in 'key' attribute.

Now:

wdContext.node<name>().get<name>ElementAt(Integer.parseInt(wdContext.currentContextElement().getKey()));

will return u the selected radiobutton.

Regards,

Piyush.

Former Member
0 Kudos

HI Udit

You can assign a parameter to each radiobutton that will be passed to the onClickAction method, where you can come to know which particular radio button was clicked.

try in wdDoModify()///////

IWDRadioButton rb1 = (IWDRadioButton)view.getElement(< Radio Button Name >);

rb1.setOnAction(< method >);/// if you are creating method dynamically.

rb1.mappingOfOnAction().addParameter("rb1",selectedButton);

now this selectedButton parameter will be passed to the method assigned to the radio button on click of that radio button.

hope it works.

Regrads

Kushagra