• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

need help with s:radio tag, display in a very strange way

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm using struts 2.1.6, I have my action code:

with getter and setter.

My jsp page:


However, my output is very weird:


every radio button and value occupied one line.

Anyone seen this before? Thanks!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd check your CSS; IIRC the radio buttons would normally be on a single line--is that what you're expecting?
 
will zhang
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Newton wrote:I'd check your CSS; IIRC the radio buttons would normally be on a single line--is that what you're expecting?



Yes, I expect the default single line. However, I don't have any special css for this page except button.

Is css the only reason which can cause this problem?

Here's my css:
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it work correctly if you create a test page w/ no CSS? How about a different browser?

There's no break tag in the radio template, which is why I suspect CSS.
 
will zhang
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David Newton wrote:Does it work correctly if you create a test page w/ no CSS? How about a different browser?

There's no break tag in the radio template, which is why I suspect CSS.



Hi Dave, I found if I don't use tiles, it works as expected(as default). But I need to use tiles, here is my layout.jsp for tiles.xml:
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, that doesn't make any sense to me either--I've used Tiles without seeing the weird rendering you're seeing (although I haven't used Tiles for awhile).

Have you tried inspecting the element in Firebug? That might give you a clue to the CSS that's causing the issue. You could also check the actual DOM in both the Tiles and non-Tiles rendering to see if it's different, possibly causing the difference. You could also tweak the Tiles definition to see if that makes a difference--it might just be that the table cell isn't wide enough and collapses, causing the radio buttons to be wrapped.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic