This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 select tag nested in table row by default

 
Kjeld Sigtermans
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David, thank you. I applied the simple theme since I do not need the extra features in this particular case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic