aspose file tools*
The moose likes Struts and the fly likes struts 2: radio buttons not properly alligned Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts 2: radio buttons not properly alligned" Watch "struts 2: radio buttons not properly alligned" New topic
Author

struts 2: radio buttons not properly alligned

vikas sharmaa
Ranch Hand

Joined: Jun 28, 2007
Posts: 191
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 28, 2007
Posts: 191
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Jun 28, 2007
Posts: 191
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

Joined: Sep 29, 2008
Posts: 12617

I'm only the best until you want to display validation error messages ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts 2: radio buttons not properly alligned