1 Reply Latest reply on Dec 29, 2011 2:44 PM by camilo_q

    [solved] Tags html, ajax and a4j:outputPanel

    camilo_q

      Good afternoon,
      I have a plane component as follows:

      <a4j:outputPanel id="panelArchivo">

           <rich:panel header="#{logMB.archivo}" style="text-align: left; overflow-y: auto; max-height: 450px;">

                #{logMB.contentFile}

           </rich:panel>

      </a4j:outputPanel>


      Then run a function to load the contentFile variable and updates the panel. The problem I have is that the content has loaded in the variable as html tags are displayed in the panel are not interpreted by the panel because they were converted to be sent by ajax, are thus <br/> => &lt br / &gt, how I make do not turn the html tags?

       

      Thanks.

        • 1. Re: Tags html, ajax and a4j:outputPanel
          camilo_q

          The solution for this is to place the text inside an outputText and set escape attribute to false.

           

          <a4j:outputPanel id="panelArchivo">

               <rich:panel header="#{logMB.archivo}" style="text-align: left; overflow-y: auto; max-height: 450px;">

                    <h:outputText escape="false" value="#{logMB.contentFile}" />

               </rich:panel>

          </a4j:outputPanel>

           

          Greetings