[转]更改struts标签样式——解决textfield等标签自动添加tr td有关问题
[转]更改struts标签样式——解决textfield等标签自动添加tr td问题
.简单的方法(也很实用)
在Struts.xml中,加上下一行代码就可以了
<constant name="struts.ui.theme" value="simple" />
代表所有的页面采用的都是 simple主题了,这时它输出的页面,不回添加任何多余的代码,比如 table tr td 等,我们就可以像其他编辑页面的方式编辑页面的风格。
或者 在 <s:form 中添加 theme
<s:form theme="simple"></s:form>
struts2每个标签都有theme属性
如果做了国际化之类有了struts.properties
我们可以修改struts.properties文件,添加
struts.ui.theme=simple
struts.ui.templateDir=template
struts.ui.templateSuffix=ftl
这样比较规范
.简单的方法(也很实用)
在Struts.xml中,加上下一行代码就可以了
<constant name="struts.ui.theme" value="simple" />
代表所有的页面采用的都是 simple主题了,这时它输出的页面,不回添加任何多余的代码,比如 table tr td 等,我们就可以像其他编辑页面的方式编辑页面的风格。
或者 在 <s:form 中添加 theme
<s:form theme="simple"></s:form>
struts2每个标签都有theme属性
如果做了国际化之类有了struts.properties
我们可以修改struts.properties文件,添加
struts.ui.theme=simple
struts.ui.templateDir=template
struts.ui.templateSuffix=ftl
这样比较规范