这是我在输出 HTML 文档中的内容(由 JSF 2.0/Mojarra 2.0.3 生成):
<input type="hidden" name="javax.faces.ViewState"
id="javax.faces.ViewState" value="4267906931114993858:-6309146738430577631"
autocomplete="off" />
我的文档应该是
XHTML 1.1
符合,其中属性 autocomplete
无效且 id
属性在所有表单中重复。如何指示 JSF 生成严格符合 XHTML 的所有内容?
最佳答案
看。
<context-param>
<param-name>com.sun.faces.autoCompleteOffOnViewState</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.enableViewStateIdRendering</param-name>
<param-value>false</param-value>
</context-param>
关于jsf - 如何生成没有 'id' 和 'autocomplete' 属性的 javax.faces.ViewState 隐藏字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5151871/