This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes STruts 2 radio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "STruts 2 radio" Watch "STruts 2 radio" New topic

STruts 2 radio

Abhilash Chander
Ranch Hand

Joined: Oct 18, 2009
Posts: 39
Hi All,
I'm using struts 2 tag to display my 5 difrrent group of radio buttons. Now as each list has values of diffrent lenghts the outcome is very irregular. Is there a way to apply style to the struts radio buttons so that they appear unifom. Here is the code to make it more simple what I'm trying to achieve.

With this code the radio buttons of each group are not aligned. What I want is, the first radio buttons of all groups should align vertically. Second radio buttons of all groups should align vertically and so on. I have attached a screenshot of the output I'm getting right now. Any advice how to align them. Thanks

[Thumbnail for radioScreenshot.JPG]

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Have you tried with html table with border=0 ?
David Newton

Joined: Sep 29, 2008
Posts: 12617

Look at the rendered output: that's what's provided by the default Struts 2 theme.

If you need output to appear in some other way, you can try using CSS (perhaps setting a width), or you'll need to modify a theme.
Consider Paul's rocket mass heater.
subject: STruts 2 radio
Similar Threads
Putting it together: Struts, Tags, OGNL
Preselect Radio Button (Default Value) - Struts2
s:radio and display tag
Form values are not set while getting the validation(fielderrors) errors in struts 2
Map not being resolved (FIXED)