• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Create HtmlSelectOneRadio through backing bean

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to create a HtmlSelectOneRadio box and add it to a panelGrid. Can anyone give me some sample code for how to create a radio box and initialize it with some test data (any data will do) through a backing bean.

My problem is I can't seem to figure out what is supposed to be in the setValue of



And without a value nothing is being displayed on the page...
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try the below.
 
James Ellis
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks so much, that worked with one small change. I guess MyFaces doesn't like SelectItems as Integers, so you have to create them as Strings. Below is the updated (working) code.

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alternatively :

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using the ICEfaces framework and also need to dynamically generate these elements. I tried to use your technique described here but ended up with an error and a blank where all the elements are supposed to be. Here is the method:



And the error I keep getting is:


This application tries to generate a form with ICEfaces elements and then display it in a ice:panelPopup element containing only one ice:panelGroup element with the property: which is a HtmlPanelGroup object from the ICEfaces library.

Any help would be appreciated because I am totally lost at the moment.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic