• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic