File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Handling of radio buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Handling of radio buttons
 
Similar Threads
preselect a radio button
how to display a textbox when a radio button is selected
MyFaces Tomahawk : Radio buttons in t:dataTable
doubt
Drag & Drop feature using GWT