aspose file tools*
The moose likes Struts and the fly likes s:textfield issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "s:textfield issue" Watch "s:textfield issue" New topic
Author

s:textfield issue

Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183
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

Joined: Sep 29, 2008
Posts: 12617

http://struts.apache.org/2.1.8/docs/themes-and-templates.html

The default theme is "xhtml".
Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 254

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.


Regards
Salil Verma
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Struts 1 doesn't have <s:textfield> tags; IMO that's not really necessary in this case.
Jay Abrahm
Ranch Hand

Joined: May 28, 2008
Posts: 183

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

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: s:textfield issue