• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Struts2 select tag nested in table row by default

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic