struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Rank <ericr...@lo-fi.net>
Subject Re: [S2] How do I disable <table><tr><td> tags generated by <s:form> ?
Date Tue, 05 Jun 2007 15:25:53 GMT
Hi Vincent,

The table layout is default for forms using the xhtml theme. You have  
a couple options if you don't want to use that. Try the css_xhtml  
theme or the simple theme.

1. Specify a different default theme globally with the  
'struts.ui.theme' property in your struts.xml file. For example, this  
line would do it for you:
<struts>
	<constant name="struts.ui.theme" value="css_xhtml" />
	....
</struts>

2. You can specify it inline when you use the tag. For example,

<s:form theme="css_xhtml"> ... </s:form>

Although, I'm not sure if this theme designation cascades down  
through the child elements. It might take some experimenting.

3. Create your own theme by extending an existing one

http://struts.apache.org/2.0.6/docs/extending-themes.html


Eric Rank


On Jun 5, 2007, at 8:17 AM, Vincent Lin wrote:

> Hi!
>
> I've done several projects with struts1 and planned to use struts2  
> in my new
> project.
> I am amazed the the code is so concise in struts2.
>
> But I have quetsion about the <s:form> tag.
> When I use <s:form> and <s:textfield>, the <table>, <tr> and
<td>  
> tags are
> generated in html page.
>
> Can I disable this feature?
> Because it might interfere my page layout.
>
> Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message