Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

s:textfield issue

 
Jay Abrahm
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • 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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://struts.apache.org/2.1.8/docs/themes-and-templates.html

The default theme is "xhtml".
 
Salil Vverma
Ranch Hand
Posts: 257
Hibernate Oracle Spring
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic