aspose file tools*
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
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: 9304
    
  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: 9304
    
  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