File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts 2: radio buttons not properly alligned

 
vikas sharmaa
Ranch Hand
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have written below code to display the radio buttons on the jsp page:



i was expecting below output:



in above output; vikas, sekimaru, raju are the name property of Employee. P1, P3, and M2 are the lvl of Employess. and 46, 47, 49 are the empCode of Employee.

but actual output of the above code is very weired as shown below:




Please guide me to align them properly.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Property tags don't have the same output as form tags. The "xhtml" tags output in table rows.

Had you considered looking at the generated HTML?!
 
vikas sharmaa
Ranch Hand
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks newton for your response. after going through the source of the page, i found that <tr> <td> tags are appended to the radio button whereas property has no tags appended as shown below:



now, i could at most append <tr><td> tags to the properties to group them together. but still i cannot show 46 vikas P1 in one row. how could i achieve it? do we have any alternatives?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to disable HTML in your post.

There are several options, including using the "simple" theme and building things by hand (which means you'll have to do error messages by hand) or extend an existing theme to provide the precise functionality you want.
 
vikas sharmaa
Ranch Hand
Posts: 191
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah newton it works after i changed the theme to simple in the form tag. thanks a lot, you are the best!!!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm only the best until you want to display validation error messages ;)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic