File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes radio buttons in a table, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "radio buttons in a table, "index" attribute of t:radio" Watch "radio buttons in a table, "index" attribute of t:radio" New topic
Author

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

Sebastien David
Greenhorn

Joined: Apr 17, 2008
Posts: 3
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

"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.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: radio buttons in a table, "index" attribute of t:radio