Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf Primefaces outputlabel的行为与escape=";假;_Jsf_Jsf 2_Primefaces - Fatal编程技术网

Jsf Primefaces outputlabel的行为与escape=";假;

Jsf Primefaces outputlabel的行为与escape=";假;,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,我使用的是primefaces 4.0,我在p:outputLabel方面遇到了问题。 当它与任何其他primefaces组件混合时,其行为类似于escape=“false” 即使我指定escape=“true”,也不会处理此字段 例如: 我有以下html代码: <h:form> <p:outputLabel value="&lt;b&gt;TEXT&lt;/b&gt;" escape="true"></p:outputLab

我使用的是primefaces 4.0,我在p:outputLabel方面遇到了问题。 当它与任何其他primefaces组件混合时,其行为类似于escape=“false”

即使我指定escape=“true”,也不会处理此字段

例如: 我有以下html代码:

<h:form>
    <p:outputLabel value="&lt;b&gt;TEXT&lt;/b&gt;" escape="true"></p:outputLabel>
    <h:outputLabel value="&lt;b&gt;TEXT&lt;/b&gt; " escape="true"></h:outputLabel>
</h:form>

对于输出,我有这个

文本

这是预期的行为。(我愿意将HTML标记视为文本)

但当我添加任何其他primefaces标记时,如示例中所示:

<h:form>
    <p:outputLabel value="&lt;b&gt;TEXT&lt;/b&gt;" escape="true"></p:outputLabel>
    <h:outputLabel value="&lt;b&gt;TEXT&lt;/b&gt; " escape="true"></h:outputLabel>
    <p:commandButton value="button"></p:commandButton>
</h:form>

现在连我都有了逃避=“真”我明白了

文本文本然后单击按钮

有没有人有过这样的经验?我该如何解决这个问题。 任何建议。

我解决了这个问题

我把这个放进了我的pom里

<dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.1.12</version>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.1.12</version>
    </dependency>

com.sun.faces
JSFAPI
2.1.12
com.sun.faces
jsf impl
2.1.12

我刚刚降级到2.1.11,一切正常。

请注意,primefaces 5.0和primefaces 3.5上也存在此问题。无法在5.0上复制。你在webapp中的任何地方使用自定义渲染器/渲染器吗?不,我创建新项目只是为了检查这个,它的行为是这样的。对,那个版本在渲染中确实有一个bug。为什么不升级到当前版本?2.1.29或2.2.8.谢谢您的评论。这对我帮助很大。