• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

s:textfield issue

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey my s:textfields renders in a new tr even if I dont define it so.




The rendered html source shows unwanted <tr><td> inserted


Am I doing something wrong here.
 
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
http://struts.apache.org/2.1.8/docs/themes-and-templates.html

The default theme is "xhtml".
 
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jay,

Kindly use struts2 at the heading. It will help other forum members to directly choose the topic according to the version they know, after seeing the heading.
 
David Newton
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
Struts 1 doesn't have <s:textfield> tags; IMO that's not really necessary in this case.
 
Jay Abrahm
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Sorry, I couldn't get to this earlier, my laptop conked out on me over the long weekend.

I switched the theme by adding and it worked.

I guess my next task would be to find out where the initial theme definition was done and get a more holistic fix done.

Thanks for your help, David.
 
David Newton
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
You may also set the theme at the <s:form> tag level, or on individual form elements, like <s:textfield>. IMO setting a scoped variable is the least-readable way of doing it.

From the page I linked to there's a page called Selecting Themes. It has a list of the mechanisms used for selecting themes. If you're always using the same theme set the property, otherwise set it on the form or form element.
 
reply
    Bookmark Topic Watch Topic
  • New Topic