cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro: radio buttons

Former Member
0 Kudos

I want to know how to made radiobuttons by group and individually.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ankit,

This tutorial explains abt all the UI elements in webdynpro ,u can check here.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ba2db0e5-0601-0010-9790-e271902f2c38">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ba2db0e5-0601-0010-9790-e271902f2c38</a>

regards

Sumit

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Radiobuttons by group:

1.create a node in the context and also 2 attr(one must be id& other any name)

2.In impl,create node and element.Set the value for id attr and name of radiobutton to the next attr.

3.Add the element to the node.

Radiobutton individually:

Create attributes and bind to 'KeytoSelect' property which must be unique and another attribute for 'Selectedkey' property which must be shared for all radiobuttons.Ser different values for 'keytoselect' property.

Regards,

Dinesh

Former Member
0 Kudos

Hi,

RadioButtonGroupByKey:-Value will be key-Value pair

For this, create a context variable(Radio) of type String and bind with selected key property.

To add values to this radio, use this code to add 5 radio buttons with text Radio1 ... Radio5.

IWDAttributeInfo att1=wdContext..getNodeInfo().getAttribute(IPrivate<ViewName>.IContextElement.RADIO);

ISimpleTypeModifiable ss1=att1.getModifiableSimpleType();

IModifiableSimpleValueSet sss1=ss1.getSVServices().getModifiableSimpleValueSet();

for(int i=0;i<5;i++)

{

sss1.put("Key"(i1),"Radio"(i1));

}

When u gets the value from radio button's context variable, u will get it's corresponding key.

U can make use of Dictionary variables' enumeration also for this.

RadioButtonGroupByIndex works similar to DDByIndex

If number of radios are static, then use RadioButton else use RadioButtonGroupByKey or RadioButtonGroupIndex

Regards,

Fahad Hamsa

Former Member
0 Kudos