How to disable struts 2 Table generation for Form?(如何禁用窗体的 struts 2 表生成?)
问题描述
Struts 2 自动为它的 <s:form> 标签生成 HTML 表格.我怎样才能禁用它?任何帮助将不胜感激.谢谢.
Struts 2 automatically generate HTML table for it's <s:form> tag. How can I disable it? Any help will be appreciated. Thank You.
推荐答案
Struts2 具有主题生成功能,基于它生成基于表格的 HTMl 代码,其标签默认为 x_html,这是您的情况.您可以通过在页面级别将主题设置为简单或每个标签具有主题属性来避免这种情况,该属性将生成基于 div 的 html 内容
Struts2 have theme generation functionality based on which it generares either Table based HTMl code for its tags default is x_html which is your case . You can avoid this by setting theme as simple on page level or each tags has theme property which will generate div based html contents
<s:form name="test" theme="simple">
或者您可以为整个页面设置主题,如下所示静态值
or you can set theme for entire page as below static value
<s:set name="theme" value="'simple'" scope="page" />
财产
<s:set name="theme" value="%{myTheme}" scope="page" />
您可以通过
<constant name="struts.ui.theme" value="simple" />
这篇关于如何禁用窗体的 struts 2 表生成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何禁用窗体的 struts 2 表生成?
基础教程推荐
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
