You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Balaji Subbu <vi...@googlemail.com> on 2008/07/09 15:55:31 UTC

[Trinidad] PPR not working if cdata tags are added to scripts

Hi

I have a ReponseWriter implementation which replaces the contents within the
scripts of the rendered page with cdata tags to escape validation. The
output of the scripts for the rendered trinidad page in doing so would be
something like shown below

<script type="text/javascript">
/* <![CDATA[ */
_submitFormCheck();
/* ]]> */
</script>

<script type="text/javascript">
/* <![CDATA[ */
var _pprUpDatemode=false;function
_adfspu(f,v,e,s,o){_pprUpdateMode=true;if(!o)o=new
Object();if(e)o.event=e;if(s)o.source=s;_submitPartialChange(f,v,o);}
/* ]]> */
</script>

Having done this the PPR requests in that page no more works.

But the original output of scripts for the same trinidad page would be
something like below, which works for the PPR request on that page.

<script type="text/javascript">_submitFormCheck();</script>

<script type="text/javascript">var _pprUpDatemode=false;function
_adfspu(f,v,e,s,o){_pprUpdateMode=true;if(!o)o=new
Object();if(e)o.event=e;if(s)o.source=s;_submitPartialChange(f,v,o);}</script>


Please let me know if there is any workaround so that I can still retain my
escape tags in scripts and get the PPR working.

Regards
Balaji