1
<s:decorate template="/layout/display-text.xhtml">
    <h:selectOneRadio layout="pageDirection" value="#{_userHome.pref}">
        <f:selectItems value="#{_userHome.getPreferences()}" />
    </h:selectOneRadio>
</s:decorate>

I am able to select user preferences by directly clicking on the text next to the radio button choice in all browsers except Firefox. How should I fix this?

itsjeyd
  • 5,070
  • 2
  • 30
  • 49
Achaius
  • 5,904
  • 21
  • 65
  • 122

1 Answers1

6

You need to add a <label> element for the radio button so that your markup looks as follows:

<label for="radio-button">Radio button label text</label>
<input type="radio" value="1" name="radio-button" id="radio-button"/>

The for and id attributes of the tags must match. To create this label, you can use the <h:outputLabel/> tag.

Pat
  • 25,237
  • 6
  • 71
  • 68