Only java guru can answer (Out of reach of lesser programmers)1000 points for answering

I have  arraylist and I need to populate the arraylist in a jsp.I am using struts so I can use logic iterate of c:foreach  populating is not  a problem for me but you se that I need to accompany a radio buttom with the arraylist the populated field look like this:
      choice   student name     number    grade   accesscode
       x              alex               3434        a            wdswwe32

       x              adf                234          b            qwerwqre23
       x              sdv                2332        f             dfvdsfvdfs21

the choice is a radio button once I select the radio button I must carry the the corresponding row values to the form bean.I.e  the corresponding values are to be placed in the form bean.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


When u are populating your table using c:foreach, make sure the radiobuttons on each row all have the SAME NAME. but set the value to be equal to some uniq key in each row.. probably accesscode.
on page submission, the formbean that is returned by struts will have one property whose name = name of the radibutton and the value will be the accesscode, ull thus be able to know which row was clicked

            <td> <input type=radio  name="myRadio" value="<put-accesCode-here>"

(PS.. i think this is the second time ur posting this...)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hi nagaala,

Use <html:radio/> tag.

Another, crude approach is to use a hidden field for each of your table column and
when you select an option, populate them appropriately and submit.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.