user1358852
user1358852

Reputation:

XPages - Radio Button Group in a table

I would like to place the radio buttons from a radio button group in different cells within a table. Is this possible?

Upvotes: 0

Views: 1209

Answers (2)

Naveen
Naveen

Reputation: 6936

You can set the groupName attribute of the radio button (not radio button group) control to group multiple radio buttons under the same name. Something like this:

<xp:radio text="Label" id="radio1" groupName="MyRadioGroup"></xp:radio>

You can then place these radio buttons at there respective cells in table. On the downside you wont be able to compute the list of items as you can in radio button group.

Another option is you could write your own custom renderer, like in this answer, that would generate the table with radio buttons for you.

Upvotes: 2

Steve Zavocki
Steve Zavocki

Reputation: 1840

Yes, totally possible. As long as the HTML "name" attribute is the same then they will be treated as the same group. You can add this to your radio button in the All Properties under "attrs". Give it a name of "name" and a value of something common between radio buttons you want to group.

I am not even sure, that you need to use the Radio Button Group if you don't want.

Upvotes: 1

Related Questions