0 Replies Latest reply on Jul 10, 2008 4:06 AM by aland

    rich:insert with xml highlighting and ajax rerender: parse p

    aland

      I am using the rich:insert component to show some highlighted xml.
      This works fine.

      But when I am using an ajax request to rerender the rich:insert component I get a parse exception.

      error[10:00:22,951]: Parse Error: XML Parsing Error: undefined entity Location: http://localhost:8080/defacto/declarations/Declaration.seam Line Number 32, Column 145: <span class="xml_tag_symbols"><</span><span class="xml_tag_name">test</span><span class="xml_tag_symbols">></span><span class="xml_plain"> </span><span class="xml_tag_symbols"></</span><span class="xml_tag_name">test</span><span class="xml_tag_symbols">></span><span class="xml_plain"></span><br />
      ------------------------------------------------------------------------------------------------------------------------------------------------^
      

      Some sample code


      <h:form>
       <rich:insert content="#{bean.xmlContent}" highlight="xml" id="testXml" />
      
       <h:inputTextarea value="#{bean.xmlContent}"></h:inputTextarea>
      
       <a4j:commandButton type="submit"
       reRender="testXml" value="Rerender">
       </a4j:commandButton>
      
       </h:form>
      


      When a space is used in the textarea I get a parse error. Somehow the (ajax) parser falls over the   which is generated by JHighlight.

      If you refresh the screen the xml is showed correctly and the   is no problem.

      Any ideas to solve this problem?