似乎存在使用一些使用passthrough
命名空间的HTML5属性的错误,即:
<h:inputText id="text1" p:autofocus p:placeholder="this is a placeholder text"></h:inputText>
当我试图在Glassfish中运行页面时,我会得到以下错误:
Error Parsing /index.xhtml: Error Traced[line: 19] Attribute name "p:autofocus" associated with an element type "h:inputText" must be followed by the ' = ' character.
注意占位符属性工作得很好,只是那些不需要指定值(=""
)的属性,例如autofocus
失败了。
这是已知的窃听器吗?
发布于 2015-03-03 18:33:56
不,这是由XHTML标准引起的
XML不支持属性最小化。属性值对必须完整地写入。属性名称(如紧凑和选中)不能出现在元素中,而不指定它们的值。
来自autofocus.asp
HTML与XHTML的区别 在XHTML中,属性最小化被禁止,并且自动焦点属性必须定义为
<input autofocus="autofocus" />
。
https://stackoverflow.com/questions/28838684
复制相似问题