on 04-19-2006 10:41 AM
Hi,
I have a table with one on the columns as a radio button.
( I have used the 'Radio Button' UI element )
The structure is as follows:
--Root node
-
Table node (Model node 'li_allocations ')
-
RadioButton node (Value Node)
-
KeyToSelect value attribute
--SelectedKey value attribute
I have bound the 'KeyToSelect' and the 'SelectedKey' properties to the respective attributes in the structure.
I have used the following code to set the values for the 'KeyToSelect' attribute
public void supplyRadioButton(IPrivateSarniaAllocationFetchView.IRadioButtonNode node, IPrivateSarniaAllocationFetchView.ILi_AllocationsElement parentElement)
{
//@@begin supplyRadioButton(IWDNode,IWDNodeElement)
int rows = wdContext.nodeLi_Allocations().size();
for(int i=0;i<=rows;i++)
{
IPrivateSarniaAllocationFetchView.IRadioButtonElement element = node.createRadioButtonElement();
node.addElement(element);
element.setKeyToSelect("KEY_"+i);
}
//@@end
}
But the following problem occurs.
1) No matter which row I select the SelectedKey attribute has KEY_0 as its value
2) Even when I click on the other columns (other than the radio button column) the radio button of that row gets selected. I want the Radio button selection to be independent of the selections I make in my other columns.
Can someone help me out?
Thanks in advance,
Reena
Reena,
1. RadioButton node must have: cardinality 1..1, singleton=false, initializeLeadSelection=true.
2. Code of supply function should be:
public void supplyRadioButton
(
IPrivateSarniaAllocationFetchView.IRadioButtonNode
node,
IPrivateSarniaAllocationFetchView.ILi_AllocationsElement
parentElement
)
{
/*@@begin supplyRadioButton(IWDNode,IWDNodeElement)*/
IPrivateSarniaAllocationFetchView.IRadioButtonElement element
= node.createRadioButtonElement();
node.addElement(element);
element.setKeyToSelect( parentElement.index() );
}
Try this
Valery Silaev
EPAM Systems
//@@end
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Valery,
I tried your solution. But I am getting the following error:
com.sap.tc.webdynpro.progmodel.context.ContextException: Node(SarniaAllocationFetchView.Zl_Wfetch_Sarnia_Allocations_Input.Output.Li_Allocations.1.RadioButton): must not add elements to a Node of cardinality 0..1 or 1..1
Any other pointers?
Thanks in advance
Reena
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.