webtier@glassfish.java.net

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

From: <webtier_at_javadesktop.org>
Date: Wed, 07 Oct 2009 13:22:04 PDT

> The change wasn't in the jsf.js, so cacheing isn't
> the problem.
I was thinking it had to be because the responseText is correct, and it works in other browsers.
>
> If you're getting a failure with single quotes, then
> you are experiencing a different problem than the one
> I fixed.
>
> Does this work?
>
> alert('it works');
>
> ?
>
> Note single quotes. Because that works for me.

No it doesn't. That is, it works in IE7, Safari and Firefox 2.0, but not in FF 3.0 and 3.5, on either WinXP or Linux. Here's my console output:

printData, type=event, status=begin
printData, type=event, status=complete
responseText=<?xml version="1.0" encoding="utf-8"?> <partial-response><changes><update id="ff:diagram"><![CDATA[<div id="ff:diagram"></div> <script type="text/javascript">alert('it works');</script>]]></update><update id="javax.faces.ViewState"><![CDATA[3818256310766227569:-25484846727242176]]></update></changes></partial-response>
printData, type=event, status=success

>
> If that works, then it's a problem getting access to
> the console object - which is going to be an
> interesting issue to fix remotely. That should work
> - and I have tests to make sure that it does.

It has to be something more than the console because the original problem was that my diagrams weren't getting updated, no console involved.

If you can give me an instrumented jsf.js file, or tell me whereabouts to look in it, I could try playing with it here.

The other thought that comes to mind, more so with the PreDestroy problem, is that I'm running Glassfish 2.1 and Tomcat (the latest) with the mojarra libs, and not Glassfish 3.0. Maybe it's time I tried 3.0. I'll let you know how I get on.
[Message sent by forum member 'judys' (judy_at_apprisant.com)]

http://forums.java.net/jive/thread.jspa?messageID=367169