This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2: how to align <s:submit /> and <s:reset /> within the same row? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Struts2: how to align &lt;s:submit /&gt; and &lt;s:reset /&gt; within the same row?" Watch "Struts2: how to align &lt;s:submit /&gt; and &lt;s:reset /&gt; within the same row?" New topic
Author

Struts2: how to align &lt;s:submit /&gt; and &lt;s:reset /&gt; within the same row?

Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
Seems that <s:submit /> and <s:reset /> will render on a separate row each. Looked through the Struts2 examples but couldn't find one that has the buttons aligned within the same row; read through the UI tags documentations but couldn't find much help on it either.

Does anyone know how to do it?


[ December 10, 2007: Message edited by: Chengwei Lee ]

SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

You could use another template, e.g. the "simple" theme or edit the one that you are currently using. Start here: http://struts.apache.org/2.x/docs/themes-and-templates.html
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
What I did was to do add the "theme" attribute like this:


But I'm still unable to get my form's text/fonts and buttons nicely displayed. For fonts, I'm seeing like TimesNewRoman. Was thinking that applying the theme would get me the same look-and-feel like the Struts 2 showcase example.

Am I doing something wrong here?
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
I added this line to my JSPs:


Now it's using the "xhtml" theme. I edited the style.css within the Struts core JAR to add in font-family:arial, but the fonts still appears in TimesNewRoman. Is this the right way to change the label font face?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Struts2: how to align &lt;s:submit /&gt; and &lt;s:reset /&gt; within the same row?
 
Similar Threads
problem with struts2...
errors.header in struts2
struts2 question
Jsp is not displaying in Struts2
struts2 tag ?