on 10-20-2008 6:50 AM
Hi Experts,
I am having a problem in using the radio button in the table.
I am having a node say "Table" under the context.
Under the Table node i created a node called "Selection" node of cardinality 1..1 and selection 1..1 .
Under the Selection node i created a attribute caleed "Value", which is binded to the radio buttons in the table.
There are 3 radio buttons namely "Accept", "Reject" and "Hold". I had assigned the KeyToSelect property of the radio buttons as "a", "r" and "h".
As default, accept should be selected.
I had used the following code. but it was not working...
for(int i=0; i<wdContext.nodetable.size(); i++)
{
wdContext.currentselectionelement().setvalue("a");
}
and also i tried with creating an element for the selection node. But still not working..... Help Me....!
Thanks and Regards,
Mugundhan.A
Hi Kandha,
Put this code out side the for loop, in WDinit mthod()
wdContext.currentselectionelement().setvalue("a");
for more check this link
http://help.sap.com/saphelp_nw04/helpdata/en/77/e8cf153ebb2e468324ee8acd525fe2/content.htm
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you check the attribute value is
try to check whatever value u r setting to context attribute, is being setup properly or not
wdComponentAPI.getMessageManager().reportSuccess("=="+wdContext.currentselectionelement().getvalue("a"));
PS : problem is with attribute value is not being setup properly
As per other way to solve this problem, i think this the standred way to do this.
Thanks
Hi Kandha
Here is solution where to use both KeyToSelect and SelectedKye
Radiobutton is usually used in groups. So the 'KeyToSelect' property says the unique value to identify each radio button, while 'SelectedKey' says which attribute has the value of the currently selected radio button. So if we need to group few radio buttons together, each of the radiobutton will have a unique value for 'KeyToSelect' but the 'SelectedKey' would be bound to the same attribute. Anytime, we access the value of the attribute bound to 'SelectedKey', we will get the 'keyToSelect' value of the currently selected radiobutton.
PS: If soluation is helpful plz award with points
Thanks
Hi
'KeyToSelect' property says the unique value to identify each radio button.
In your case if you want to use (or giving Reference) this radio button furthure then create a new attribute and bind with it.
Or follow the same steps, which you have done with your rest of the two attributes
Let me know, if it is not clear to you.
Thanks
Hi,
Under the Table node i created a node called "Selection" node of cardinality 1..1 and selection 1..1 . ?
why you taken selection node under the table node any specific reason ?
i think you bind the table uoi with Table node,
then create a attribute "value" under the table node bind with radio button.
and do like this,
for(int i=0; i<wdContext.nodetable.size(); i++)
{
wdContext.nodeTable().getTableeleemntAt(i).setvalue("a");
}
Regards,
ramesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.