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 Struts2 UI Tags Not Aligned On Browser 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 "Struts2 UI Tags Not Aligned On Browser" Watch "Struts2 UI Tags Not Aligned On Browser" New topic
Author

Struts2 UI Tags Not Aligned On Browser

Hakan Gercek
Greenhorn

Joined: May 20, 2005
Posts: 2
I am new in struts2 and want to develop a program which inserts records into database. I have faced a problem while using UI Tags of struts2. Here is my code block in jsp:



In the above code block, I would like to align printerMark, markCheckbox and markTextField on the same row. On Eclipse screen, these are aligned. However, on browser, each UI component is placed on new row which can be found in the attachment.

Is there a way to align these components on the same row?

Thanks for advance.


[Download printer_question_on_javaranch.bmp] Download

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

http://struts.apache.org/2.x/docs/themes-and-templates.html

The default theme is "xhtml", which renders table rows around UI elements.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Use simple theme of Struts. The default XHTML theme adds formatting information of its own. If you set the theme property of s:form tag, then all the s:select, s:textfield and s:checkbox in the form tag will be rendered without any formatting...

[Ahh, too late ]


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
jQuery in Action, 2nd edition
 
subject: Struts2 UI Tags Not Aligned On Browser
 
Similar Threads
How to retain the latest selected value of drop down box.
struts2 select and js
Help in Debugging
unable to do validation for select in struts2
Problem while implementing cascade select option in Struts2 [City/Locality/Streets]