cancel
Showing results for 
Search instead for 
Did you mean: 

Creating radio buttons in table coloumn.

Former Member
0 Kudos

Please share any documents available on how to

create and implement radio buttons in table coloumns .

And please also share how to read the enabled or diaabled radio buttons

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here is a guide to provide this feature:

The context:

- Persons (Node)

-- Name (Attribute)

-- SelectedKey (Attribute, String)

-- Selection (Node, cardinality: 0..1, selection: 1..1, supplyFuntion selectPerson)

--- KeyToSelect (Attribute, String)

Layout:

- Add table with dataSource propertie: Persons

- Tablerow TextView with propertie text: Persons.Name

- Tablerow RadioButton with propertie keyToSelect: Persons.Selection.KeyToSelect, selectedKey: Persons.SelectedKey, onSelect: SelectPerson

Code:

public void selectPerson(......) {

ISelectionElement el = node.createSelectionElement();

node.addElement(el);

el.setKeyToSelect(parentElement.getName());

}

public void onActionSelectPerson(.....) {

for (int i=0; i < wdContext.nodePersons().size(); i++) {

if (i != wdContext.nodePersons().getLeadSelection()) {

wdContext.nodePersons().getElementAt(i).setAttributeValue("SelectedKey", null);

}

}

}

Method above is for not getting a multiple select (work-around)

If you have a button in your layout that submits the selection, you can read the selected row with:

String key = wdContext.nodePersons().currentPersonsElement().getSelectedKey();

wdComponentAPI.getMessageManager().reportSuccess(key);

Regards,

Björn

Paresh,

Does this guide solved your problem?

Message was edited by: B. van Prooijen

Answers (2)

Answers (2)

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Paresh,

At first help.sap.com is always a great start with its tutorials:

http://help.sap.com/saphelp_nw04/helpdata/de/15/0d4f21c17c8044af4868130e9fea07/frameset.htm

Web Dynpro Sample Applications and Tutorials

http://sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...

Regards

Suresh

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Radiobuttons in table:

Check this thread

To enable or dissable an radiobutton

Check Armin post to disable the particlular row cell editor based on condition using calculated attribute.

Regards,

Vijayakhanna Raman