• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
will zhang
Ranch Hand
Posts: 46
  • 0
  • 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!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • 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
  • 0
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • 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
  • 0
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic