-1

I have this code

<h:selectOneRadio  value="#{MyBean.valueAttr}" >
<f:selectItem itemLabel="Button1"/>
<f:selectItem itemLabel="Button2" />
<f:selectItem itemLabel="Button3" />
</h:selectOneRadio>

I wanted to know if there is a way to set up the Button3 as the chosen button (default) initially. Thanks

Tiny
  • 27,221
  • 105
  • 339
  • 599
ArLi91
  • 361
  • 1
  • 5
  • 8

1 Answers1

1

Add itemValue attribute to your f:selectItem and set default value of #{MyBean.valueAttr} in your bean

Szarpul
  • 1,531
  • 11
  • 21