cancel
Showing results for 
Search instead for 
Did you mean: 

How to create radio button group in the table?

Former Member
0 Kudos

Hi expert,

I am tring to insert new columns to a table in the NetWeaver studio and need these columns with Radiobutton kind and grouped together..But the Radiobutton Group element cannot be dragged to the table.

And then I create two columns, and each has a radio button element. But these radio buttons cannot be grouped.

If you know the solution, please kindly enlighten me

Thanks in advance!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Just use a drop-down list instead.

Armin

Former Member
0 Kudos

Hi Armin

To keep the same layout with the backend system, using dropdown list is not good.

That's why I use radio button.

Thanks

Stephen Guo

Former Member
0 Kudos

Hi Stephen,

I'd say the best case would be use a calculatedAttribute, and do some manual coding in that into another Value Property. Fact is, the event "onRowSelection" does not update the value, so you might also have some code in that method if you need so.

Regards,

Daniel

Former Member
0 Kudos

Hi guys,

Thank you for all your reply..

I will try and reply you later.

Former Member
0 Kudos

What does that mean? A drop-down list is just a more space-efficient realization of a single-selection.

Armin

Former Member
0 Kudos

Hi Armin

In the backend system, the corresponding infotype's layout uses RadioButton group. To provide the consistent layout to customer, I wanna use Radiobutton in the Java wed dynpro too.

Thanks

Stephen Guo

Former Member
0 Kudos

In a Web Dynpro Table you cannot use a radio-button group as cell editor, but you can use a drop-down list which offers the same functionality with another graphical representation.

Armin

Former Member
0 Kudos

Hi Guo,

if you want to gradio button behanes as group concept (only single radio button click at a time) then you have to binding only on context value attribute into each radio button in Table.other wise Group concept fail...

if you want to set the row in Table from Backend then you have to created row with radio button

suppose

Value Node--Person

attribute--Male,female,Maleselectokey,flemaleselectokey

Male,female-------two attribute Binding into SelectedKEy property of RadioButton

Maleselectokey,flemaleselectokey--two attribute Binding into KeyToselect property of RadioButton

for(int i=0;i<model size;i++)

{

wdContext.nodeperson().getPersonElementAt(i).setMale(false);

wdContext.nodeperson().getPersonElementAt(i).setFemale(false);

//

wdContext.nodeperson().getPersonElementAt(i).setMaleselectokey(true);

wdContext.nodeperson().getPersonElementAt(i).setflemaleselectokey(true);

}

Thanks

jati

Former Member
0 Kudos

Hi GUO,

You can not create Group Radio button in Table but you can create number of culumn as per requirement and insert number of radio button which has put individual column.will create on context value attribute type should be boolean(click attribute and go to TYPE property of attribute and set boolean instead of String)

VAlue Attribute-radioTypeboolean.

set context attribute as radio set SelectedKey property of RadioButton Ui Element insividual.

suppose you have 3 radio button in 3Culumn then attribute as radio set each of radionbutton .it behaves as RadioGruop button.no need to create RadioGroup by index...

its sufficient

Thanks

jati

Former Member
0 Kudos

Hi jati

I have met some issues.

1 For radio buttton, there is two attributes need to be set: keyToSelect, selectedKey. What's the difference? And how to set them?

2 Suppose adding 3 column (column1, column2, column3), each has a radiobutton (radiobutton1, radiobutton2, radiobutton3 respectively). Now, I still need to create a context value attribute (for example, radio_chose) with boolean type, and set the "selectedKey" attribute of each radiobutton with "radio_chose". Am I right?

3 If I do step2, when I first enter the screen, all the radiobutton are checked by default. Not only one checked.

Thanks.

Stephen GUO

Former Member
0 Kudos

Hi,

Keytoselect is the unique identifier for each radio button. eg. key_1, key_2, key_3 for 3 radio buttons respectively.

If you want your first radio button to be selected then selectedKey should be key_1.

Regards,

Murtuza

Former Member
0 Kudos

Hi jati

When I set the radio button attributes as following:

radiobutton1 radiobutton2 radiobutton3

keyToSelect key1 key2 key3

selectedKey key1 key1 key1

3 radiobuttons are still checked by default. (key1, key2, key3 are all boolean).

Do I misunderstand or something?

Thanks

Stephen Guo

Former Member
0 Kudos

Hi Murtuza

As per your reply, I successfully stimulated the Radio button group. The following is steps:

Create 3 radio button Radiobutton1, Radiobutton2, Radiobutton3

Set attributes as following:

Radiobutton1 Radiobutton2 Radiobutton3

keyToSelect T B X

selectedKey Cadme Cadme Cadme

When Cadme = T or B or X, Radiobutton1, Radiobutton2, Radiobutton3 will be checked respectively.

Cadme should have type: string

Thanks for your help

Stephen Guo