aspose file tools*
The moose likes Struts and the fly likes Struts2 select tag nested in table row by default Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 select tag nested in table row by default" Watch "Struts2 select tag nested in table row by default" New topic
Author

Struts2 select tag nested in table row by default

Kjeld Sigtermans
Ranch Hand

Joined: Aug 10, 2006
Posts: 122
Hi,

I am new to Struts2 and I have just implemented the Struts2 'select' tag... (thanks!)

In the HTML result the select tag is surrounded by:

Why is this tr/td wrapper added by default? I (eventually) do not want to use my select box in a table cell. Just need the <select> tag and its contents. Do I have to specify a style?

Thanks!


Kjeld Sigtermans - SCJP 1.4 - SCWCD 1.4
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The default "xhtml" theme wraps form tags in table tags (as you've seen). You can specify the "simple" theme, with the caveat that error messages will no longer be displayed.

See the following (they may not all apply to you):

http://struts.apache.org/2.x/docs/themes-and-templates.html
http://struts.apache.org/2.x/docs/selecting-themes.html
http://struts.apache.org/2.x/docs/extending-themes.html

I almost always extend an existing theme, although I may switch over to Java-based tags for performance--haven't decided yet.
Kjeld Sigtermans
Ranch Hand

Joined: Aug 10, 2006
Posts: 122
David, thank you. I applied the simple theme since I do not need the extra features in this particular case.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 select tag nested in table row by default