cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Buttons

Former Member
0 Kudos

Hi,

How can we make only one radio button enable and rest in disabled mode while loading the page.

Regards,

Venkat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

What's the use case?

Armin

Former Member
0 Kudos

Hi,

Requirement is to display two radio buttons( for ex. male and female) in the screen. while loading the page, only one radio button ( male ) should be checked.

I have created only one context attribute and mapped the same to the two radio buttons.

how to uncheck the second radio button ( female) when the page gets loaded.

Former Member
0 Kudos

Hi Armin,

Requirement is to display two radio buttons( for ex. male and female) in the screen. while loading the page, only one radio button ( male ) should be checked.

I have created only one context attribute and mapped the same to the two radio buttons.

how to uncheck the second radio button ( female) when the page gets loaded.

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

1)if ur using a individual radio button u have two attribute one is key to select and another is selected key.

U should have two key to select for two radio button and one selected key commonly binded to both the radio button.

In the init method set the key to select for the two radio buttons(ie Male and female).

Then which radio button u want to select by default

is set by setting the selected key (ie male)

2) If ur using Radio button group by key,

Create an attribute change the type of attribute to dictionary data type(ie. Create a dictionary simple type

male and female) then bind it to the selected key property of the Radio button group by key.

In the init method set the attribute to male.

Regards,

Vijay

Former Member
0 Kudos

Hi Vijay,

I understood your answer. Can I request you to explain in details by writing some pseudo code.

Thanks.

Regards,

Venkat

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Write in doinit.

1) for Individual radio button.

wdContext.currentContextElement().setKey("Male");

wdContext.currentContextElement().setKey_1("Female");

wdContext.currentContextElement().setSelectedkey("Male");

2) for radio button by key.

Create a dictionary simple type

ie. go to webdynpro explorer expand dictionary>data type>simpletype-->create simple type.Give name and package.

Select Enumuration tab

Add new--> value=1,description=male

Add new--> value=2,description=female

Write in doinit.

wdContext.currentContextElement().setSelectedkey("1");

Regards,

Vijay

Former Member
0 Kudos

Hi Vijay,

Thanks a lot for your help. It is working fine by using your second choice.

THanks once again.

Regards,

Venkat

Answers (1)

Answers (1)

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

Set the enabled property of the radio button to false.

Regards,

Vijay