webtier@glassfish.java.net

Re: [webtier] JSF2: using JavaScript to update a component

From: Jim Driscoll <Jim.Driscoll_at_Sun.COM>
Date: Wed, 07 Oct 2009 16:50:39 -0700

I'll try to look at this tonight.

Do you mean that the object isn't created? That's odd, and may be
related to your not escaping the actual JS code inside the script with
CDATA (which is complicated, since CDATA doesn't nest). But I won't
know until I try, I guess.

Jim

On 10/7/09 4:25 PM, webtier_at_javadesktop.org wrote:
> Well, I'm sorry, I should have tried that earlier.
> Anyway, all my browsers check out as expected (incl. Seamonkey)
>
> I did notice one odd thing though. If I write this:
>
> responseText=<?xml version="1.0" encoding="utf-8"?>
> <partial-response><changes><update id="ff:diagram"><![CDATA[<div id="ff:diagram">
> <script type="text/javascript">apprisant.Diagram.update({ d:'ff:diagram', w:770, h:351, mw:'770px', ss:'null',
> src:'/jsf2demos/agdiagram?id=/orgchart/layout.xhtml:ff:diagram&q=956878&ctr=4&t=dgm&d=s&s=' });</script></div> ]]>
> </update><update id="ff:messages"><![CDATA[<div id="ff:messages"></div>]]></update><update id="javax.faces.ViewState"><![CDATA[-8792858761052945448:-4800208156458950691]]></update></changes></partial-response>
>
> The src param is a URL. If I write it as is, it fails on Seamonkey, Firefox 2.0, and Safari 3.2 and 4. If I escape the ampersands, it fails on everything else. I know you don't care about Seamonkey and FF2, but Safari 4 is the latest& greatest, downloaded in the last hour.
>
> This is not an issue for me, I'm sure I can find a workaround and rebuild the URL on the client side, but I thought you should know.
> [Message sent by forum member 'judys' (judy_at_apprisant.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=367185
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>