Search code examples
jsfjsf-2checkboxselectoneradio

Is there something like h:selectOneCheckbox?


I want something with design like many checkboxes and user must select only one checkbox. There is h:selectManyCheckbox, but thre isn't h:selectOneCheckbox. I also know to do it with h:selectOneRadio, but it shows all radio buttons in one line, although I write <br/> between <f:selectItem>.

How can I do it in JSF 2.0?


Solution

  • You can use h:selectOneRadio with layout attribute set to pageDirection in order to render the radio buttons vertically.