File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sebastien David
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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 hutputText, 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic