This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Pipeline as Code and have Mohamed Labouardy on-line!
See this thread for details.
Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

How to make one of the Radio button default selected

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to make one of the Radio button "default selected" in jsf when the page is rendered.

I am using h:selectOneRadio tag.

<h:selectOneRadio id="PageStyle" value="#{StyleBean.styleType}" >
<f:selectItem id="sa_id" itemValue="0" itemLabel="Style1" />
<f:selectItem id="wl_id" itemValue="1" itemLabel="Style2" />
<f:selectItem id="ot_id" itemValue="2" itemLabel="Style2" />
</h:selectOneRadio>
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"thushar" please check your private messages for an important administrative matter. You can see them by clicking the My Private Messages link above.
And welcome to Javaranch
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Set the value of variable styleType as 0,1,or 2 whichever you want as default.

Thanks
Ketan.
 
I wasn't selected to go to mars. This tiny ad got in ahead of me:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic