Does anyone know an easy way to suppress the fieldset that is rendered with a <xp:radioGroup> tag ?
As I am already grouping several controls into my own fieldset I don't want another fieldset appearing within my fieldset - it just doesn't look good.
I have replaced the radiogroup with a set of individual radiobuttons, but that presents a new problem - the defaultSelected attribute which should set the button by default doesn't appear to do anything. That makes it more difficult to validate that at least one of the radio buttons is selected when the form is submitted.
Is the issue with defaultSelected down to me or is this a bug with the core Xpages code ?
<fieldset>
...
other controls in my fieldset
...
<xp:label value="Frequency" id="lFrequency"/>
<xp:radio text="Weekly" id="rbWeek" defaultSelected="true" groupName="rgFrequency" style="position:absolute;left:8em">
<xp:eventHandler event="onclick" submit="false" script="resetRadioButton (['#{id:rbFort}','#{id:rbMonth}','#{id:rbOther}'], '#{id:rbWeek}')" />
</xp:radio>
<xp:radio text="Fortnightly" id="rbFort" style="position:absolute;left:16em" groupName="rgFrequency">
<xp:eventHandler event="onclick" submit="false" script="resetRadioButton (['#{id:rbWeek}','#{id:rbMonth}','#{id:rbOther}'], '#{id:rbFort}')"/>
</xp:radio>
<xp:radio text="Monthly" id="rbMonth" style="position:absolute;left:24em" groupName="rgFrequency">
<xp:eventHandler event="onclick" submit="false" script="resetRadioButton (['#{id:rbWeek}','#{id:rbFort}','#{id:rbOther}'], '#{id:rbMonth}')"/>
</xp:radio>
<xp:radio text="Other" id="rbOther" style="position:absolute;left:32em" groupName="rgFrequency">
<xp:eventHandler event="onclick" submit="false" script="resetRadioButton (['#{id:rbWeek}','#{id:rbFort}','#{id:rbMonth}'], '#{id:rbOther}')"/>
</xp:radio>
<fieldset>
Code for the event handler function -
function resetRadioButton (Group, Button) {
if (dojo.byId(Button).checked) {
for (var I = 0; I < Group.length; I++) {
dojo.byId(Group[I]).checked = false
}
}
}