H:panelGroup中style属性在生成的HTML中出现两次 [英] h:panelGroup style attribute appears twice in generated HTML
问题描述
我只是看到我的项目的源$ C $ C,发现如下(样式属性产生两次):
i just viewed the source Code of my project and found the following (style attribute generated twice):
<span style="color: #bb0000;" style="color: #bb0000;">Hello</span>
从这个JSF- code生成的:
generated from this JSF-Code:
<h:panelGroup style="color: #bb0000;">
<h:outputText value="Hello" />
</h:panelGroup>
但如果我将其更改为:
but if i change this to:
<h:panelGroup >
<h:outputText value="Hello" style="color: #bb0000;"/>
</h:panelGroup>
这会产生一个正确的HTML:
this generates a correct html:
<span style="color: #bb0000;">Hello</span>
以上只是用于测试的例子!
the above is just an example for testing!
同样的事情发生显示:inline-block的; ....等等!
same thing happens for display: inline-block; ....etc!
ENV:Tomcat上8 JSF Mojarra 2.2.0
ENV: JSF Mojarra 2.2.0 on Tomcat 8
任何想法/交代,为什么出现这种情况?
any idea / explaination why this happen?
推荐答案
其Mojarra 2.2.0中的错误并固定在2.2.8
its a bug in Mojarra 2.2.0 and fixed in 2.2.8
和这里是链接到的Bug /修复: https://java.net/jira /浏览/ JAVASERVERFACES-3270
and here is the link to the Bug/Fix: https://java.net/jira/browse/JAVASERVERFACES-3270
这篇关于H:panelGroup中style属性在生成的HTML中出现两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!