This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Handling of radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Handling of radio buttons" Watch "Handling of radio buttons" New topic
Author

Handling of radio buttons

Nrapendra Sharma
Ranch Hand

Joined: Jun 16, 2008
Posts: 31
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


Regards,
Nrapendra Sharma
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

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??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Nrapendra Sharma
Ranch Hand

Joined: Jun 16, 2008
Posts: 31
I want to know it when form is submitted. At server side.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

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)...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling of radio buttons
 
Similar Threads
Drag & Drop feature using GWT
how to display a textbox when a radio button is selected
doubt
MyFaces Tomahawk : Radio buttons in t:dataTable
preselect a radio button