File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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

Sebastien David

Joined: Apr 17, 2008
Posts: 3

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:

It seems that the index attribute doesn't accept my var. An exemple of the same code is given here:

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

"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 - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: radio buttons in a table, "index" attribute of t:radio
It's not a secret anymore!