4 Replies Latest reply on May 4, 2010 8:10 PM by T J

    Help with AJAX filtering?

    T J Newbie

      I think this is a Ajax filtering problem - but not 100% sure....


      I have a custom component that renders the following simple svg:


      <svg xmlns="http://www.w3.org/2000/svg"
                      viewBox="0 0 100 100" width="200px" height="200px"> 
                      <circle cx="25" cy="25" r="25" style="stroke: black; fill:none" />

      TEXT OUTSIDE svg


      On initial load, circles appear on the page as expected.


      After Ajax call, the circles disappear and all that remains is "TEXT OUTSIDE svg".


      The following is from the a4j log and shows the relevant part of the response to AJAXREQUEST :


      <tr><td id="j_id40:myGrid:0"  class="rich-table-cell"><div>TEXT OUTSIDE  svg</div></td>


      It shows the svg is not in the Ajax response and never got sent to the client?  Note that the renderer sends both the svg and the TEXT OUTSIDE svg as a  single string, so if the TEXT OUTSIDE svg is present, the renderer sent  the svg as well.


      I ... think ... I have turned off Ajax filtering with:




      Anyone have any ideas on what may be going on here or what I may try next?

        • 1. Re: Help with AJAX filtering?
          T J Newbie

          I am using 3.3.2.GA

          • 2. Re: Help with AJAX filtering?
            T J Newbie

            It looks like the parser is forced to be a Tidy parser if the page is being refreshed with Ajax independent of any settings in web.xml (I did not see this in the docs anywhere)?  The Tidy parser filters out any of the XML passed inline  (like is being done in my example) - and returns only the text after the Ajax refresh.....  BTW the inline XML is well formed according to one of the validation sites around - cannot remember which I tried.

            ConfigurableXMLFilter will return a Tidy parser via the getParser call if it is called with isAjax set to true instead of the FastHtmlParser (which the documentation leads me to believe should be passed if NONE is set as the parser).

            Seems like a bug based on the documentation I have read....

            The only work-around I have found thus far is to have getParser in ConfigurableXMLFilter always return a FastHtmlParser which requires a custom build of RF - also - I am quite unsure of the consequences of always returning FastHtmlParser - does anyone have any ideas of another work-around - or am I still getting something wrong here?

            • 3. Re: Help with AJAX filtering?
              Nick Belaevski Master



              Try using NEKO parser.

              • 4. Re: Help with AJAX filtering?
                T J Newbie

                Thanks!  NEKO parser seems to be working fine - does not filter out relevant XML - setting parser to none, however, still seems to be broken.