0

我正在使用 JSF 2.2 和 RichFaces 4.5.1。在其中一个中,rich:popupPanel我正在使用h:outputText标记来显示由 JTidy 解析的 HTML 数据。数据是来自我们正在使用的 Web 服务之一的响应。

JTidy 在解析的 HTML 中添加了 CDATA 标记,这似乎是数据未显示在屏幕上的主要原因。但是,如果我删除 CDATA 它可以正常工作,而且如果我将h:outputText标签从丰富的弹出面板中取出,那么即使使用 CDATA 它也可以正常工作。

谁能告诉我为什么 CDATA 是其中的h:outputText一部分时不显示数据的原因rich:popupPanel

这是我的弹出窗口:

<rich:popupPanel modal="true" width="600" id="responsePanel" 
    autosized="true" style="positon: relative;">

    <f:facet name="header">
        <s:span id="responsePanelHeader">
            <h:outputText style="text-decoration:underline"
                value="#{armReportFile.armReport.providerType}" />
        </s:span>
    </f:facet>

    <f:facet name="controls">
        <span id="" class="closePanel"
            onclick="#{rich:component('responsePanel')}.hide()"/> 
    </f:facet>

    <s:div id="responsePanel1" style="max-height:565px;overflow-x:auto;overflow-y:auto;">
        <c:choose>
            <c:when test="#{not empty armReportFile.armReport.rawHtmlData}">
                <h:outputText value="#{armReportFile.rawHtmlDataParsed}" escape="false"/>
            </c:when>
            <c:otherwise>
                <ui:include src="armAdditionalproviderDetails.xhtml" />
            </c:otherwise>                      
        </c:choose>
        <c:if test="#{s:hasPermission('view_configurations', null)}">
            <span id="showxml_link" onclick="showXML('showxml_link')">
                View Raw Response </span>
            <h:inputHidden value="#{armReportFile.armReport.rawData}"
                id="rawData" disabled="true" />
            <c:if test="#{armReportFile.showProviderRequest()}">
                <span id="requestPanel_link" style="padding: 0px 10px;"
                    onclick="showXML('requestPanel_link')">View Raw Request</span>
                <h:inputHidden value="#{armReportFile.armReport.rawProviderRequest}"
                    id="rawRequest" disabled="true" />
            </c:if>
            <br class="clearfloat" />
            <s:div id="XMLHolder" style="display:none;"></s:div>
            <s:div id="requestPanel_XMLHolder" style="display:none;"></s:div>
        </c:if>
    </s:div>
</rich:popupPanel>
4

0 回答 0