• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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

 
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
And inside of my fortune cookie was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic