on 08-03-2006 10:45 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.