aspose file tools*
The moose likes Struts and the fly likes two s:textfield in the same TD in the same line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "two s:textfield in the same TD in the same line" Watch "two s:textfield in the same TD in the same line" New topic
Author

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

Shashank Rudra
Ranch Hand

Joined: Mar 26, 2009
Posts: 131
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.


Programmer Analyst || J2EE web development/design
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You also have the option of creating your own theme.
Shashank Rudra
Ranch Hand

Joined: Mar 26, 2009
Posts: 131
thanks folks.. David any pointer to a link that shows how to create your own theme.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

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

Joined: Mar 26, 2009
Posts: 131
yes I was just looking on strtus2 documentation pages. you guys are so prompt in helping, I appreciate that buddies.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: two s:textfield in the same TD in the same line