Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two s:textfield in the same TD in the same line

 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Question#1

I need to display two s:textfield in the same line like two TDs in one TR. But all I am getting is these are creating two TRs and are not in line. How to get it right and display both the textfields in the same line as if in the same TR. TIA

Question#2

Also related to the struts tag I am facing this problem now as s:submit is being replaced with <div align=right> the button is not centrally aligned. How to get this correct.

Question#3

Do we have "s:button" or similar tag in struts2 ?

Any link that does help understand these intricacies will be very helpful.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts uses the xhtml theme which generates some layout code in addition to the actual form elements. If you want to control the look yourself, you can use the simple theme which doesn't generate any layout tags like tr or td. To change the theme, you can use the theme attribute on the form or textfield or submit etc tags. All the tags that struts 2 has are listed here...
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You also have the option of creating your own theme.
 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks folks.. David any pointer to a link that shows how to create your own theme.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you do a simple google search on how to create a theme in struts 2?? There are hundreds of results. You can find examples here or here...
 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes I was just looking on strtus2 documentation pages. you guys are so prompt in helping, I appreciate that buddies.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic