0

I am using JSF 2.2 and RichFaces 4.5.1. In one of the rich:popupPanel I am using h:outputText tag to show HTML data that is parsed by JTidy. Data is the response from one of the web services that we are using.

JTidy adds CDATA tag in parsed HTML which seems the primary reason why data is not showing up on screen. However if I remove CDATA it is working fine and also if I put h:outputText tag out of rich popup panel then it is working fine even with CDATA.

Can any one tell me the reason that why CDATA is the cause of h:outputText is not showing data when it is part of rich:popupPanel?

Here's my popup:

<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>
Emil Sierżęga
  • 1,785
  • 2
  • 31
  • 38

0 Answers0