Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling of radio buttons

 
Nrapendra Sharma
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using struts and velocity for UI.
There are dynamic radio buttons which are populated in UI using foreach of velocity.

My question is how can i know which radio button is seleted by user.
Challenges:
I can not use javascript.
I cannot use struts tags.

Any idea how to achieve this ???

Regards,
Nrapendra

 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i know which radio button is seleted by user

What do you mean by this?? Do you want to know this in the browser or after the form is submitted??
 
Nrapendra Sharma
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know it when form is submitted. At server side.
 
Ankit Garg
Sheriff
Posts: 9529
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose your radio buttons have the name attribute's value as "category", then create a property in your struts action (to which the form is submitted) named category (with appropriate getters and setters)...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic