on 07-12-2006 9:37 AM
Hi!
I have radiobuttongruoup element in my application with 4 radiobuttons. By defect, always it appears selected first lead and I would like that the second was selected. How I can do this?. It is possible?. I'm working with webdynpro abap.
Thanks in advance.
Thank to all by your answers. The code that I have used is the following:
data: datanode type ref to if_wd_context_node.
datanode = wd_context->get_child_node( name = 'DATA' ).
datanode->SET_LEAD_SELECTION_INDEX( INDEX = '2').
Best regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi I bring u the code that solve the problem,
IPrivateTestCompView.ICV_dropNode node=wdContext.nodeCV_drop();
node.invalidate();
for(int i=0;i<8;i++)
{
IPrivateTestCompView.ICV_dropElement element=wdContext.createCV_dropElement();
element.setCV_value("Hello"+i );
if(i==6)
{
node.addElement(i,element);
node.setLeadSelection(i);
}
else
{
node.addElement(element);
}
}
This code works well for me
try this
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ana Ros,
if u want to set a particular radio button in a group as selected then you can use setLeadSelection() method.
that is, if u want to set the second one as selected by default use this
node.seLeadSelection(1);
-> 'node' is the name of the node which is used to bind the elements of the radiobuttongroup in the code area.
regards
karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Saravanan, but I'm working with webdynpro abap.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Heidi! I have already seen that documentation, but it is not what I´m looking for. I look for some method to select lead certain (in my case, the second), and that doesn't appear the predetermined one (that is to say, first)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Saravanan!. Sorry, it's radiobuttongroup by index.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
does this help? http://help.sap.com/saphelp_nw2004s/helpdata/en/bb/69b441b0133531e10000000a155106/frameset.htm
Regards, Heidi
Hi,
First determine the number of radiobuttons and get the size and enter the sample code like this.
//for(int i=0;i<size;i++)
{
//Add the code to create element for the node bounded to radiobutton.
//check the position u want to set the lead selection.
//suppose 3rd button to get lead selected.
if(i==3)
{
node.addElement(0,element);
node.setLeadselection(0);
}
else
{
node.addElement(element);
}
}
Try this.
Saravanan K
Hi Ana,
You must have bound a context node to the "Texts" property of the RadioButtonGroupByIndex UI element.Let's call that node as "DATA".
Say for example, you want to get the second RadioButton in that group to be selected. Then you will use:
data: datanode type ref to if_wd_context_node.
datanode = wd_context->get_child_node( name = 'DATA' ).
datanode->set_lead_selection( paramName = '1').
Actually I don't know the paramater name that needs to be passed to the set_lead_selection method, so I have used paramName. Please look up the correct parameter name.
Regards,
Satyajit.
Hi,
Can u tell me which radiobuttongroup type( index or key) u used?
Saravanan K
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.