• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Group of radio buttons in different location

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I'm trying to make a JSF form that will have 2 radio buttons acting as html radio buttons group(when pressing one radio button the other one will be unchecked).
The problem is that the 2 radio buttons are not one near each other but in different locations on page(if they were one near eache other I could use h:selectOneRadio), like:
<div1> <h:selectOneRadio 1></div1>
<div2>....</div2>
<div3>....</div3>
<div4>....</div4>
<div5> <h:selectOneRadio 2></div5>
I need these two radio buttons will act like in HTML and will be mapped(if possible) to the same member in the bean.

Advanced thanks,
Avi
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont know whether there are any tags in corejsf. But in Trinidad there is a way to do it.

Use <tr:selectBooleanRadio group="myGroup" value=#{Bean.value}/>

You can use this selectBooleanRadio anywhere in this page provided if you give the 'group' name similar everywhere it will work as you expect.
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is possible using tomahawk component as well.

Detailed example is here.
http://wiki.apache.org/myfaces/Display_Radio_Buttons_In_Columns
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic