cancel
Showing results for 
Search instead for 
Did you mean: 

Radio button group-select particular button

Former Member
0 Kudos

Hi All,

I am new to WebDynpro. Already i have created RadioButtonGroup sucessfully.

My problem is while update mode i have to set particular radio button as selected. How can i do?. Please help me.

By

Kiran.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mody,

If you are using List to create RadioButton creation use the following code. If Node name is xxx then you can select 4th button as default selected.

wdContext.nodeXXX().setLeadSelection(4);

Kind Regards,

S.Saravanan.

Message was edited by: Saravanan S

Former Member
0 Kudos

Hi Saravanan,

I am not understanding with List creation.Can you give full code for create RadioButton?. Please help me.

By,

Kiran.

Former Member
0 Kudos

Hi Kiran,

Use the following steps.

Step 1:

Create node(Frequentie) with some attributes.set cardinality to 0..n and selection to 0..1

Step 2:

Bind this node to RadioButtonGroupByIndex's texts property.

Setp 3:

Inside DoInit() write the following codes.

Create one List

List recurenceType = new ArrayList(); int x=0;

while(x<10){

<View Name>.IFrequentieElement elefreq=wdContext.createFrequentieElement();

String id="Sample"+x;

elefreq.setId(id);

recurenceType.add(elefreq);

}

Step 5:

Bind this List into Frequentie node.

wdContext.nodeFrequentie().bind(recurenceType);

setp 6:

If you want to 5th item selected as default.

wdContext.nodeFrequentie().setLeadSelection(4);

<b>Valuable Answer=Point</b>

Kind Regards,

S.Saravanan

Former Member
0 Kudos

Hi Saravanan,

Thanks for your valuable reply. my problem has been solved. Your code is very much useful.

By,

Kiran.

Answers (0)