Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2: how to align <s:submit /> and <s:reset /> within the same row?

 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic