• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Html Radio buttons and Arraylist

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have arraylist in my action and I am storing it as session to display on the jsp page.

Action.java:
request.getSession().setAttribute("asstRqstConcResults", asstRqstResults);

Inside the Arraylist the objects stored are of the Actionform: ConcurrentCaseInfoForm class.

On the jsp I am displaying as follows:





What I am trying to acheive is, when the user selects the radio buttons either accept or reject. I want to store the values(whatever the user selects) and submit the form. That is onclicking "OK"(which is not in the code) button, I want to send the values the user choose to the action. Lets assume an example:

There are seven objects in the arraylist and so seven rows would be displayed. Each row will have an accept and reject radio button, now the user can select accept on one row and could select reject on the other row. Lets says the user selects reject for the 3rd row. So I want my application to associate the reject decision with its information on that row and submit it so that i will know what the user selected. Depending on what the user selected I have to perform the further actions.

Please see I am using indexed radio buttons by mentioning indexed="true" for selecting the accept or reject.

Please let me know if you have any other suggestions too.

Thank you very much.
Luke.



 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Luke Zechariah
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one please answer for this. My deadline is soon approaching. Thanks for your time.
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

May be this example would be useful for you

http://faq.javaranch.com/java/IndexedProperties
http://www.developer.com/java/web/article.php/2233591/Succeeding-With-Struts-Indexed-Properties-and-Beans-as-Properties.htm


 
Not so fast naughty spawn! I want you to know about
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic