• 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

radio buttons in a table, "index" attribute of t:radio

 
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 would like to build a datatable, containing one radio button per line. This subject is in every forums I found, but my problem is very strange. I use Tomahawk components. Here is a part of my code:



I've got a NullPointerException error when the "index" attribute of the radio component is filled with a dynamic value. If I replace index="#{index}" by index="0", it works fine but every radio button will have the same value. And If I display the #{index} via a h:outputText, the line index is correctly displayed.

Here are the first lines of the stack trace:


Il semblerait que la balise index ne prenne pas en compte ma variable, et renseigne toujours NULL. Pourtant, un exemple est donn� sur cette page: http://wiki.apache.org/myfaces/Displ...ons_In_Columns

It seems that the index attribute doesn't accept my var. An exemple of the same code is given here: http://wiki.apache.org/myfaces/Display_Radio_Buttons_In_Columns

Thanks.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"electro bonobo",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic