I created an xPage with a repeat control on it. The repeat control creates multiple radio buttons. In order to connect the different radio buttons to a group they need to have the same group name. The radio group name needs to be computed in my case. The problem is that these computed radio group names are not equal per group. This leads to the problem that the radio buttons don’t build a group and it is possible to activate every radio button at the same time.
Is there any other workaround than manually create radio buttons?
Subject: Computing the group name
Hi Isabel,
Not 100% sure this meets your use case exactly, but you should be able to use the repeat collection name as part of the groupname. This way it will be unique for each group.
For example, a repeat control collection name is “docid” which contains a unique docid. On the radio button group name, you can select computed and have something like “radio_”+docid;
John
Subject: That’s what I did
I generate 3 radio buttons. The groupname of each radio button is the collection name of the repeat control. When I open the xPage in the browser and look at the source code, the names of the 3 radio buttons look like this:1.name=“view:_id1:_id244:1:_id259:0:collectionName”
2.name=“view:_id1:_id244:1:_id259:1:collectionName”
3.name=“view:_id1:_id244:1:_id259:2:collectionName”
For each name of a radio button a prefix (view:_id1:_id244:1:_id259:1:) is added. (Radio buttons are stored in an object called elements. This object is structured like an array.) Within the prefix I’ll find the index of every radio button: 0,1,2,…
And this is the reason why the group name is not unique for each group.
Subject: sounds to me you need nested repeat controls
Isabel,
It sounds to me that you need to have 2 repeat controls: 1 for the grouping, then 1 within that for the radio buttons for each grouping. This way you would have unique grouping IDs.
Perhaps you can post a sample, that would help understand the issue better.
John
Subject: I see…
I created a sample and I see your issue. No matter what the group name is XPages appends it’s own when generating the radio buttons from within the repeat control.
I believe this is a bug, unless there is a property to prevent this from happening.
Here’s a link to a sample:
http://www.jmackey.net/groupwareinc/johnblog/JohnBlog.nsf/D6plinks/GROC7H4RKH.htm/$FILE/XPagesRadioButtons.nsf
John
Subject: Yes that’s it
Many thanks for the example John and sorry for not posting an own example. But thats exactly how it works at the moment with the beta 1.
There seem to be multiple issues with radio buttons. I posted another issues concerning the value of the radio buttons as well. And this time i added an example 
Subject: Use the “skipContainers” property to address this issue
If you select the Radio control, in the All Properties tab there’s a property “skipContainers”
To fix the example you would set skipContainers to 1
If the radio were nested within multiple repeats then you could choose what level to group to, e.g.:
<xp:repeat value="#{world.continentList}" var="continent">
<xp:repeat value="#{continent.countryList}" var="country">
<xp:radio text="#{country.name}" groupName="nameTypeInCountry"></xp:radio>
<xp:radio text="#{country.fullName}" groupName="nameTypeInCountry"></xp:radio>
<xp:radio text="#{country.name}" groupName="countryInCurrentContinent" skipContainers="1"></xp:radio>
<xp:radio text="#{country.name}" groupName="countryInWorld" value="#{countryInWorld}" skipContainers="2"></xp:radio>
</xp:repeat>
</xp:repeat>
The first 2 radios will be grouped within the inner repeat.
The 3rd radio will be grouped within the current continent.
The 4rd radio will be grouped across the entire HTML page.
Thomas Gumz - Advisory Software Engineer - IBM Lotus Software